/**
* Will return the right UrlAlias in regards to configured root location.
*
* @param string $pathinfo
* @return \eZ\Publish\API\Repository\Values\Content\URLAlias
*/
protected function getUrlAlias($pathinfo)
{
if ($this->rootLocationId === null || $this->generator->isUriPrefixExcluded($pathinfo)) {
return parent::getUrlAlias($pathinfo);
}
return $this->urlAliasService->lookup($this->generator->getPathPrefixByRootLocationId($this->rootLocationId) . $pathinfo);
}