eZ\Publish\Core\Repository\Repository::getURLAliasService PHP Method

getURLAliasService() public method

Get URLAliasService.
public getURLAliasService ( ) : eZ\Publish\API\Repository\URLAliasService
return eZ\Publish\API\Repository\URLAliasService
    public function getURLAliasService()
    {
        if ($this->urlAliasService !== null) {
            return $this->urlAliasService;
        }
        $this->urlAliasService = new URLAliasService($this, $this->persistenceHandler->urlAliasHandler(), $this->serviceSettings['urlAlias']);
        return $this->urlAliasService;
    }

Usage Example

 /**
  * Returns path corresponding to $rootLocationId.
  *
  * @param int $rootLocationId
  * @return string
  */
 public function getPathPrefixByRootLocationId($rootLocationId)
 {
     if (isset($this->pathPrefixMap[$rootLocationId])) {
         return $this->pathPrefixMap[$rootLocationId];
     }
     $this->pathPrefixMap[$rootLocationId] = $this->repository->getURLAliasService()->reverseLookup($this->loadLocation($rootLocationId))->path;
     return $this->pathPrefixMap[$rootLocationId];
 }
All Usage Examples Of eZ\Publish\Core\Repository\Repository::getURLAliasService