Neos.Neos/Classes/Domain/Service/SiteService.php
public function pruneSite(Site $site)
    {
        $siteNodePath = NodePaths::addNodePathSegment(static::SITES_ROOT_PATH, $site->getNodeName());
        $this->nodeDataRepository->removeAllInPath($siteNodePath);
        $siteNodes = $this->nodeDataRepository->findByPath($siteNodePath);
        foreach ($siteNodes as $siteNode) {
            $this->nodeDataRepository->remove($siteNode);
        }

        $site->setPrimaryDomain(null);
        $this->siteRepository->update($site);

        $domainsForSite = $this->domainRepository->findBySite($site);
        foreach ($domainsForSite as $domain) {
            $this->domainRepository->remove($domain);
        }
        $this->persistenceManager->persistAll();

        $this->siteRepository->remove($site);

        $this->emitSitePruned($site);
    }
public function pruneSite(Site $site)
    {
        $siteNodePath = NodePaths::addNodePathSegment(static::SITES_ROOT_PATH, $site->getNodeName());
        $this->nodeDataRepository->removeAllInPath($siteNodePath);
        $siteNodes = $this->nodeDataRepository->findByPath($siteNodePath);
        foreach ($siteNodes as $siteNode) {
            $this->nodeDataRepository->remove($siteNode);
        }

        $site->setPrimaryDomain(null);
        $this->siteRepository->update($site);

        $domainsForSite = $this->domainRepository->findBySite($site);
        foreach ($domainsForSite as $domain) {
            $this->domainRepository->remove($domain);
        }
        $this->persistenceManager->persistAll();

        $this->siteRepository->remove($site);

        $this->emitSitePruned($site);
    }
public function pruneSite ( Site $ site ) { $ siteNodePath = NodePaths :: addNodePathSegment ( static :: SITES_ROOT_PATH , $ site -> getNodeName ( ) ) ; $ this -> nodeDataRepository -> removeAllInPath ( $ siteNodePath ) ; $ siteNodes = $ this -> nodeDataRepository -> findByPath ( $ siteNodePath ) ; foreach ( $ siteNodes as $ siteNode ) { $ this -> nodeDataRepository -> remove ( $ siteNode ) ; } $ site -> setPrimaryDomain ( null ) ; $ this -> siteRepository -> update ( $ site ) ; $ domainsForSite = $ this -> domainRepository -> findBySite ( $ site ) ; foreach ( $ domainsForSite as $ domain ) { $ this -> domainRepository -> remove ( $ domain ) ; } $ this -> persistenceManager -> persistAll ( ) ; $ this -> siteRepository -> remove ( $ site ) ; $ this -> emitSitePruned ( $ site ) ; }
Remove given site all nodes for that site and all domains associated.

@param Site $site
@return void
Remove given site all nodes for that site and all domains associated .