public function findDefault()
{
if ($this->defaultSiteNodeName === null) {
return $this->findOnline()->getFirst();
}
/**
* @var Site $defaultSite
*/
$defaultSite = $this->findOneByNodeName($this->defaultSiteNodeName);
if (!$defaultSite instanceof Site || $defaultSite->getState() !== Site::STATE_ONLINE) {
throw new NeosException(sprintf('DefaultSiteNode %s not found or not active', $this->defaultSiteNodeName), 1476374818);
}
return $defaultSite;
}