PHP Class eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator

See also: eZ\Publish\Core\MVC\Symfony\Routing\UrlAliasRouter
Inheritance: extends eZ\Publish\Core\MVC\Symfony\Routing\Generator
Show file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\Repository $repository, Symfony\Component\Routing\RouterInterface $defaultRouter, eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver, array $unsafeCharMap = [] )
doGenerate ( eZ\Publish\API\Repository\Values\Content\Location $location, array $parameters ) : string Generates the URL from $urlResource and $parameters.
getPathPrefixByRootLocationId ( integer $rootLocationId, array $languages = null, string $siteaccess = null ) : string Returns path corresponding to $rootLocationId.
isUriPrefixExcluded ( string $uri ) : boolean Checks if passed URI has an excluded prefix, when a root location is defined.
loadLocation ( integer $locationId ) : Location Loads a location by its locationId, regardless to user limitations since the router is invoked BEFORE security (no user authenticated yet).
setExcludedUriPrefixes ( array $excludedUriPrefixes )
setRootLocationId ( integer $rootLocationId ) Injects current root locationId that will be used for link generation.

Method Details

__construct() public method

public __construct ( eZ\Publish\API\Repository\Repository $repository, Symfony\Component\Routing\RouterInterface $defaultRouter, eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver, array $unsafeCharMap = [] )
$repository eZ\Publish\API\Repository\Repository
$defaultRouter Symfony\Component\Routing\RouterInterface
$configResolver eZ\Publish\Core\MVC\ConfigResolverInterface
$unsafeCharMap array

doGenerate() public method

Entries in $parameters will be added in the query string.
public doGenerate ( eZ\Publish\API\Repository\Values\Content\Location $location, array $parameters ) : string
$location eZ\Publish\API\Repository\Values\Content\Location
$parameters array
return string

getPathPrefixByRootLocationId() public method

Returns path corresponding to $rootLocationId.
public getPathPrefixByRootLocationId ( integer $rootLocationId, array $languages = null, string $siteaccess = null ) : string
$rootLocationId integer
$languages array
$siteaccess string
return string

isUriPrefixExcluded() public method

Checks if passed URI has an excluded prefix, when a root location is defined.
public isUriPrefixExcluded ( string $uri ) : boolean
$uri string
return boolean

loadLocation() public method

Not to be used for link generation.
public loadLocation ( integer $locationId ) : Location
$locationId integer
return eZ\Publish\Core\Repository\Values\Content\Location

setExcludedUriPrefixes() public method

public setExcludedUriPrefixes ( array $excludedUriPrefixes )
$excludedUriPrefixes array

setRootLocationId() public method

Injects current root locationId that will be used for link generation.
public setRootLocationId ( integer $rootLocationId )
$rootLocationId integer