src/Sulu/Component/Webspace/Loader/XmlFileLoader10.php
protected function checkUrlNode(\DOMNode $urlNode)
    {
        $hasLocalization = (null != $urlNode->attributes->getNamedItem('localization'))
            || (false !== strpos($urlNode->nodeValue, '{localization}'));

        $hasLanguage = (null != $urlNode->attributes->getNamedItem('language'))
            || (false !== strpos($urlNode->nodeValue, '{language}'))
            || $hasLocalization;

        $hasSegment = (0 == count($this->webspace->getSegments()))
            || (null != $urlNode->attributes->getNamedItem('segment'))
            || (false !== strpos($urlNode->nodeValue, '{segment}'));

        $hasRedirect = (null != $urlNode->attributes->getNamedItem('redirect'));

        return ($hasLanguage && $hasSegment) || $hasRedirect;
    }
protected function checkUrlNode(\DOMNode $urlNode)
    {
        $hasLocalization = (null != $urlNode->attributes->getNamedItem('localization'))
            || (false !== strpos($urlNode->nodeValue, '{localization}'));

        $hasLanguage = (null != $urlNode->attributes->getNamedItem('language'))
            || (false !== strpos($urlNode->nodeValue, '{language}'))
            || $hasLocalization;

        $hasSegment = (0 == count($this->webspace->getSegments()))
            || (null != $urlNode->attributes->getNamedItem('segment'))
            || (false !== strpos($urlNode->nodeValue, '{segment}'));

        $hasRedirect = (null != $urlNode->attributes->getNamedItem('redirect'));

        return ($hasLanguage && $hasSegment) || $hasRedirect;
    }
protected function checkUrlNode ( \ DOMNode $ urlNode ) { $ hasLocalization = ( null != $ urlNode -> attributes -> getNamedItem ( 'localization' ) ) || ( false !== strpos ( $ urlNode -> nodeValue , '{localization}' ) ) ; $ hasLanguage = ( null != $ urlNode -> attributes -> getNamedItem ( 'language' ) ) || ( false !== strpos ( $ urlNode -> nodeValue , '{language}' ) ) || $ hasLocalization ; $ hasSegment = ( 0 == count ( $ this -> webspace -> getSegments ( ) ) ) || ( null != $ urlNode -> attributes -> getNamedItem ( 'segment' ) ) || ( false !== strpos ( $ urlNode -> nodeValue , '{segment}' ) ) ; $ hasRedirect = ( null != $ urlNode -> attributes -> getNamedItem ( 'redirect' ) ) ; return ( $ hasLanguage && $ hasSegment ) || $ hasRedirect ; }
Checks if the urlNode is valid for this webspace.

@param \DOMNode $urlNode

@return bool
Checks if the urlNode is valid for this webspace .