Class

eZ\Publish\Core\MVC\Symfony\Routing\Generator

abstract class Generator implements SiteAccessAware

Base class for eZ Publish Url generation.

Methods

setRequestContext(RequestContext $requestContext)

setSiteAccessRouter(SiteAccessRouterInterface $siteAccessRouter)

setSiteAccess(SiteAccess $siteAccess = null)

setLogger(LoggerInterface $logger = null)

string generate(mixed $urlResource, array $parameters, int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)

Triggers URL generation for $urlResource and $parameters.

string doGenerate(mixed $urlResource, array $parameters)

Generates the URL from $urlResource and $parameters.

Details

at line 46
public setRequestContext(RequestContext $requestContext)

Parameters

RequestContext $requestContext

at line 54
public setSiteAccessRouter(SiteAccessRouterInterface $siteAccessRouter)

Parameters

SiteAccessRouterInterface $siteAccessRouter

at line 62
public setSiteAccess(SiteAccess $siteAccess = null)

Parameters

SiteAccess $siteAccess

at line 70
public setLogger(LoggerInterface $logger = null)

Parameters

LoggerInterface $logger

at line 85
public string generate(mixed $urlResource, array $parameters, int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)

Triggers URL generation for $urlResource and $parameters.

Parameters

mixed $urlResource Type can be anything, depending on the context. It's up to the router to pass the appropriate value to the implementor.
array $parameters Arbitrary hash of parameters to generate a link. SiteAccess name can be provided as 'siteaccess' to generate a link to it (cross siteaccess link).
int $referenceType The type of reference to be generated (one of the constants)

Return Value

string

at line 126
abstract public string doGenerate(mixed $urlResource, array $parameters)

Generates the URL from $urlResource and $parameters.

Parameters

mixed $urlResource
array $parameters

Return Value

string