public function pruneCommand($siteNode = null, $siteNodeName = null)
{
if ($siteNode !== null) {
$siteNodeName = $siteNode;
}
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.');
}
}