eZPublishCommunityProject  2013.9
eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator Class Reference

URL generator for UrlAlias based links. More...

+ Inheritance diagram for eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator:
+ Collaboration diagram for eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator:

Public Member Functions

 __construct (\Closure $lazyRepository, RouterInterface $defaultRouter, LoggerInterface $logger=null)
 
 doGenerate ($location, array $parameters)
 Generates the URL from $urlResource and $parameters. More...
 
 getPathPrefixByRootLocationId ($rootLocationId)
 Returns path corresponding to $rootLocationId. More...
 
 isUriPrefixExcluded ($uri)
 Checks if passed URI has an excluded prefix, when a root location is defined. More...
 
 setExcludedUriPrefixes (array $excludedUriPrefixes)
 
 setRootLocationId ($rootLocationId)
 Injects current root locationId that will be used for link generation. More...
 
 setSiteAccess (SiteAccess $siteAccess=null)
 
- Public Member Functions inherited from eZ\Publish\Core\MVC\Symfony\Routing\Generator
 doGenerate ($urlResource, array $parameters)
 Generates the URL from $urlResource and $parameters. More...
 
 generate ($urlResource, array $parameters, $absolute=false)
 Triggers URL generation for $urlResource and $parameters. More...
 
 setRequestContext (RequestContext $requestContext)
 

Public Attributes

const INTERNAL_LOCATION_ROUTE = '_ezpublishLocation'
 

Protected Member Functions

 getRepository ()
 
- Protected Member Functions inherited from eZ\Publish\Core\MVC\Symfony\Routing\Generator
 generateAbsoluteUrl ($uri)
 Generates an absolute URL from $uri and the request context. More...
 

Private Attributes

 $defaultRouter
 
 $excludedUriPrefixes = array()
 
 $lazyRepository
 
 $logger
 
 $pathPrefixMap = array()
 
 $rootLocationId
 
 $siteAccess
 

Additional Inherited Members

- Protected Attributes inherited from eZ\Publish\Core\MVC\Symfony\Routing\Generator
 $requestContext
 

Detailed Description

URL generator for UrlAlias based links.

See Also

Constructor & Destructor Documentation

eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::__construct ( \Closure  $lazyRepository,
RouterInterface  $defaultRouter,
LoggerInterface  $logger = null 
)

Member Function Documentation

eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::doGenerate (   $location,
array  $parameters 
)

Generates the URL from $urlResource and $parameters.

Entries in $parameters will be added in the query string.

Parameters
\eZ\Publish\API\Repository\Values\Content\Location$location
array$parameters
Returns
string
eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::getPathPrefixByRootLocationId (   $rootLocationId)

Returns path corresponding to $rootLocationId.

Parameters
int$rootLocationId
Returns
string

Referenced by eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator\doGenerate().

eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::getRepository ( )
protected
eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::isUriPrefixExcluded (   $uri)

Checks if passed URI has an excluded prefix, when a root location is defined.

Parameters
string$uri
Returns
bool

Referenced by eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator\doGenerate().

eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::setExcludedUriPrefixes ( array  $excludedUriPrefixes)
Parameters
array$excludedUriPrefixes
eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::setRootLocationId (   $rootLocationId)

Injects current root locationId that will be used for link generation.

Parameters
int$rootLocationId
eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::setSiteAccess ( SiteAccess  $siteAccess = null)

Member Data Documentation

eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::$defaultRouter
private
eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::$excludedUriPrefixes = array()
private
eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::$lazyRepository
private
eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::$logger
private
eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::$pathPrefixMap = array()
private
eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::$siteAccess
private
const eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::INTERNAL_LOCATION_ROUTE = '_ezpublishLocation'

The documentation for this class was generated from the following file: