PHP Class Contao\CoreBundle\Routing\UrlGenerator

Inheritance: implements Symfony\Component\Routing\Generator\UrlGeneratorInterface
Exibir arquivo Open project: contao/core-bundle Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\Routing\Generator\UrlGeneratorInterface $router, Contao\CoreBundle\Framework\ContaoFrameworkInterface $framework, boolean $prependLocale ) Constructor.
generate ( string $name, array $parameters = [], integer $referenceType = self::ABSOLUTE_PATH ) : string Generates a Contao URL.
getContext ( )
setContext ( Symfony\Component\Routing\RequestContext $context )

Private Methods

Method Description
addHostToContext ( Symfony\Component\Routing\RequestContext $context, array $parameters, string &$referenceType ) Sets the context from the domain.
getAutoItems ( array $parameters ) : array Returns the auto_item key from the parameters or the global array.
getHostAndPort ( $domain ) : array Extracts host and port from the domain.
prepareAlias ( string $alias, array &$parameters ) Adds the parameters to the alias.
prepareDomain ( Symfony\Component\Routing\RequestContext $context, array &$parameters, integer &$referenceType ) Forces the router to add the host if necessary.
prepareLocale ( array &$parameters ) Removes the locale parameter if it is disabled.

Method Details

__construct() public method

Constructor.
public __construct ( Symfony\Component\Routing\Generator\UrlGeneratorInterface $router, Contao\CoreBundle\Framework\ContaoFrameworkInterface $framework, boolean $prependLocale )
$router Symfony\Component\Routing\Generator\UrlGeneratorInterface
$framework Contao\CoreBundle\Framework\ContaoFrameworkInterface
$prependLocale boolean

generate() public method

Generates a Contao URL.
public generate ( string $name, array $parameters = [], integer $referenceType = self::ABSOLUTE_PATH ) : string
$name string
$parameters array
$referenceType integer
return string

getContext() public method

public getContext ( )

setContext() public method

public setContext ( Symfony\Component\Routing\RequestContext $context )
$context Symfony\Component\Routing\RequestContext