Neos.Neos/Classes/Controller/Module/Administration/SitesController.php
public function deleteDomainAction(Domain $domain)
    {
        $site = $domain->getSite();
        if ($site->getPrimaryDomain() === $domain) {
            $site->setPrimaryDomain(null);
            $this->siteRepository->update($site);
        }
        $this->domainRepository->remove($domain);
        $this->addFlashMessage('The domain "%s" has been deleted.', 'Domain deleted', Message::SEVERITY_OK, [htmlspecialchars($domain)], 1412373310);
        $this->unsetLastVisitedNodeAndRedirect('edit', null, null, ['site' => $site]);
    }
public function deleteDomainAction(Domain $domain)
    {
        $site = $domain->getSite();
        if ($site->getPrimaryDomain() === $domain) {
            $site->setPrimaryDomain(null);
            $this->siteRepository->update($site);
        }
        $this->domainRepository->remove($domain);
        $this->addFlashMessage('The domain "%s" has been deleted.', 'Domain deleted', Message::SEVERITY_OK, [htmlspecialchars($domain)], 1412373310);
        $this->unsetLastVisitedNodeAndRedirect('edit', null, null, ['site' => $site]);
    }
public function deleteDomainAction ( Domain $ domain ) { $ site = $ domain -> getSite ( ) ; if ( $ site -> getPrimaryDomain ( ) === $ domain ) { $ site -> setPrimaryDomain ( null ) ; $ this -> siteRepository -> update ( $ site ) ; } $ this -> domainRepository -> remove ( $ domain ) ; $ this -> addFlashMessage ( 'The domain "%s" has been deleted.' , 'Domain deleted' , Message :: SEVERITY_OK , [ htmlspecialchars ( $ domain ) ] , 1412373310 ) ; $ this -> unsetLastVisitedNodeAndRedirect ( 'edit' , null , null , [ 'site' => $ site ] ) ; }
Deletes a domain attached to a site

@param Domain $domain A domain to delete
@Flow\IgnoreValidation("$domain")
@return void
Deletes a domain attached to a site