protected function getUrlAlias($pathinfo)
    {
        $pathPrefix = $this->generator->getPathPrefixByRootLocationId($this->rootLocationId);

        if (
            $this->rootLocationId === null ||
            $this->generator->isUriPrefixExcluded($pathinfo) ||
            $pathPrefix === '/'
        ) {
            return parent::getUrlAlias($pathinfo);
        }

        return $this->urlAliasService->lookup($pathPrefix . $pathinfo);
    }
protected function getUrlAlias($pathinfo)
    {
        $pathPrefix = $this->generator->getPathPrefixByRootLocationId($this->rootLocationId);

        if (
            $this->rootLocationId === null ||
            $this->generator->isUriPrefixExcluded($pathinfo) ||
            $pathPrefix === '/'
        ) {
            return parent::getUrlAlias($pathinfo);
        }

        return $this->urlAliasService->lookup($pathPrefix . $pathinfo);
    }
protected function getUrlAlias ( $ pathinfo ) { $ pathPrefix = $ this -> generator -> getPathPrefixByRootLocationId ( $ this -> rootLocationId ) ; if ( $ this -> rootLocationId === null || $ this -> generator -> isUriPrefixExcluded ( $ pathinfo ) || $ pathPrefix === '/' ) { return parent :: getUrlAlias ( $ pathinfo ) ; } return $ this -> urlAliasService -> lookup ( $ pathPrefix . $ pathinfo ) ; }
Will return the right UrlAlias in regards to configured root location.

@param string $pathinfo

@throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if the path does not exist or is not valid for the given language

@return \eZ\Publish\API\Repository\Values\Content\URLAlias
Will return the right UrlAlias in regards to configured root location .