/**
  * Remove all content and related data - for now. In the future we need some more sophisticated cleanup.
  *
  * @param string $siteNodeName Name of a site root node to clear only content of this site.
  * @return void
  */
 public function pruneCommand($siteNodeName = null)
 {
     if ($siteNodeName !== null) {
         $possibleSite = $this->siteRepository->findOneByNodeName($siteNodeName);
         if ($possibleSite === null) {
             $this->outputLine('The given site site node did not match an existing site.');
             $this->quit(1);
         }
         $this->siteService->pruneSite($possibleSite);
         $this->outputLine('Site with root "' . $siteNodeName . '" has been removed.');
     } else {
         $this->siteService->pruneAll();
         $this->outputLine('All sites and content have been removed.');
     }
 }
 /**
  * Delete a site.
  *
  * @param Site $site Site to create
  * @Flow\IgnoreValidation("$site")
  * @return void
  */
 public function deleteSiteAction(Site $site)
 {
     $this->siteService->pruneSite($site);
     $this->addFlashMessage('The site "%s" has been deleted.', 'Site deleted', Message::SEVERITY_OK, array(htmlspecialchars($site->getName())), 1412372689);
     $this->unsetLastVisitedNodeAndRedirect('index');
 }