src/Sulu/Component/Webspace/Loader/XmlFileLoader10.php
protected function generatePortalLocalizations(\DOMNode $portalNode, Portal $portal)
    {
        if ($this->xpath->query('x:localizations', $portalNode)->length > 0) {
            // set localizations from portal, if they are set
            $localizationNodes = $this->xpath->query('x:localizations/x:localization', $portalNode);
            $this->generateLocalizationsFromNodeList($localizationNodes, $portal);
        } else {
            // if the portal has no localizations fallback to the localizations from the webspace
            $localizationNodes = $this->xpath->query('/x:webspace/x:localizations//x:localization');
            $this->generateLocalizationsFromNodeList($localizationNodes, $portal, true);
        }
    }
protected function generatePortalLocalizations(\DOMNode $portalNode, Portal $portal)
    {
        if ($this->xpath->query('x:localizations', $portalNode)->length > 0) {
            // set localizations from portal, if they are set
            $localizationNodes = $this->xpath->query('x:localizations/x:localization', $portalNode);
            $this->generateLocalizationsFromNodeList($localizationNodes, $portal);
        } else {
            // if the portal has no localizations fallback to the localizations from the webspace
            $localizationNodes = $this->xpath->query('/x:webspace/x:localizations//x:localization');
            $this->generateLocalizationsFromNodeList($localizationNodes, $portal, true);
        }
    }
protected function generatePortalLocalizations ( \ DOMNode $ portalNode , Portal $ portal ) { if ( $ this -> xpath -> query ( 'x:localizations' , $ portalNode ) -> length > 0 ) { // set localizations from portal, if they are set $ localizationNodes = $ this -> xpath -> query ( 'x:localizations/x:localization' , $ portalNode ) ; $ this -> generateLocalizationsFromNodeList ( $ localizationNodes , $ portal ) ; } else { // if the portal has no localizations fallback to the localizations from the webspace $ localizationNodes = $ this -> xpath -> query ( '/x:webspace/x:localizations//x:localization' ) ; $ this -> generateLocalizationsFromNodeList ( $ localizationNodes , $ portal , true ) ; } }
Generates all localizations for the given portal.

@param \DOMNode $portalNode
@param Portal $portal
Generates all localizations for the given portal .