src/Kunstmaan/MultiDomainBundle/Helper/DomainConfiguration.php
public function getRootNode($host = null)
    {
        if (!$this->isMultiDomainHost()) {
            return parent::getRootNode();
        }

        if (is_null($this->rootNode)) {
            $host = $this->getRealHost($host);

            $internalName = $this->hosts[$host]['root'];
            $nodeRepo = $this->em->getRepository('KunstmaanNodeBundle:Node');
            $this->rootNode = $nodeRepo->getNodeByInternalName($internalName);
        }

        return $this->rootNode;
    }
public function getRootNode($host = null)
    {
        if (!$this->isMultiDomainHost()) {
            return parent::getRootNode();
        }

        if (is_null($this->rootNode)) {
            $host = $this->getRealHost($host);

            $internalName = $this->hosts[$host]['root'];
            $nodeRepo = $this->em->getRepository('KunstmaanNodeBundle:Node');
            $this->rootNode = $nodeRepo->getNodeByInternalName($internalName);
        }

        return $this->rootNode;
    }
public function getRootNode ( $ host = null ) { if ( ! $ this -> isMultiDomainHost ( ) ) { return parent :: getRootNode ( ) ; } if ( is_null ( $ this -> rootNode ) ) { $ host = $ this -> getRealHost ( $ host ) ; $ internalName = $ this -> hosts [ $ host ] [ 'root' ] ; $ nodeRepo = $ this -> em -> getRepository ( 'KunstmaanNodeBundle:Node' ) ; $ this -> rootNode = $ nodeRepo -> getNodeByInternalName ( $ internalName ) ; } return $ this -> rootNode ; }
Fetch the root node for the current host

@param string|null $host

@return Node|null
Fetch the root node for the current host