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

Inheritance: implements eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessAware
Exibir arquivo Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$logger Psr\Log\LoggerInterface
$requestContext Symfony\Component\Routing\RequestContext
$siteAccess eZ\Publish\Core\MVC\Symfony\SiteAccess
$siteAccessRouter eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface

Public Methods

Method Description
doGenerate ( mixed $urlResource, array $parameters ) : string Generates the URL from $urlResource and $parameters.
generate ( mixed $urlResource, array $parameters, integer $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ) : string Triggers URL generation for $urlResource and $parameters.
setLogger ( Psr\Log\LoggerInterface $logger = null )
setRequestContext ( Symfony\Component\Routing\RequestContext $requestContext )
setSiteAccess ( SiteAccess $siteAccess = null )
setSiteAccessRouter ( eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface $siteAccessRouter )

Protected Methods

Method Description
generateAbsoluteUrl ( string $uri, Symfony\Component\Routing\RequestContext $requestContext ) : string Generates an absolute URL from $uri and the request context.

Private Methods

Method Description
getContextBySimplifiedRequest ( SimplifiedRequest $simplifiedRequest ) : Symfony\Component\Routing\RequestContext Merges context from $simplifiedRequest into a clone of the current context.

Method Details

doGenerate() abstract public method

Generates the URL from $urlResource and $parameters.
abstract public doGenerate ( mixed $urlResource, array $parameters ) : string
$urlResource mixed
$parameters array
return string

generate() public method

Triggers URL generation for $urlResource and $parameters.
public generate ( mixed $urlResource, array $parameters, integer $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ) : string
$urlResource mixed Type can be anything, depending on the context. It's up to the router to pass the appropriate value to the implementor.
$parameters array Arbitrary hash of parameters to generate a link. SiteAccess name can be provided as 'siteaccess' to generate a link to it (cross siteaccess link).
$referenceType integer The type of reference to be generated (one of the constants)
return string

generateAbsoluteUrl() protected method

Generates an absolute URL from $uri and the request context.
protected generateAbsoluteUrl ( string $uri, Symfony\Component\Routing\RequestContext $requestContext ) : string
$uri string
$requestContext Symfony\Component\Routing\RequestContext
return string

setLogger() public method

public setLogger ( Psr\Log\LoggerInterface $logger = null )
$logger Psr\Log\LoggerInterface

setRequestContext() public method

public setRequestContext ( Symfony\Component\Routing\RequestContext $requestContext )
$requestContext Symfony\Component\Routing\RequestContext

setSiteAccess() public method

public setSiteAccess ( SiteAccess $siteAccess = null )
$siteAccess eZ\Publish\Core\MVC\Symfony\SiteAccess

setSiteAccessRouter() public method

public setSiteAccessRouter ( eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface $siteAccessRouter )
$siteAccessRouter eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface

Property Details

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
return Psr\Log\LoggerInterface

$requestContext protected_oe property

protected RequestContext,Symfony\Component\Routing $requestContext
return Symfony\Component\Routing\RequestContext

$siteAccess protected_oe property

protected SiteAccess,eZ\Publish\Core\MVC\Symfony $siteAccess
return eZ\Publish\Core\MVC\Symfony\SiteAccess

$siteAccessRouter protected_oe property

protected SiteAccessRouterInterface,eZ\Publish\Core\MVC\Symfony\SiteAccess $siteAccessRouter
return eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface