class RouterHelper extends Helper

RouterHelper manages links between pages in a template context.

Properties

protected $charset from Helper
protected $generator

Methods

setCharset(string $charset)

Sets the default charset.

from Helper
string
getCharset()

Gets the default charset.

from Helper
__construct(UrlGeneratorInterface $router)

No description

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

Generates a URL from the given parameters.

string
path(string $name, mixed $parameters = array(), bool $relative = false)

Generates a URL reference (as an absolute or relative path) to the route with the given parameters.

string
url(string $name, mixed $parameters = array(), bool $schemeRelative = false)

Generates a URL reference (as an absolute URL or network path) to the route with the given parameters.

string
getName()

Returns the canonical name of this helper.

Details

in Helper at line 31
setCharset(string $charset)

Sets the default charset.

Parameters

string $charset The charset

in Helper at line 41
string getCharset()

Gets the default charset.

Return Value

string The default charset

at line 26
__construct(UrlGeneratorInterface $router)

Parameters

UrlGeneratorInterface $router

at line 42
string generate(string $name, mixed $parameters = array(), int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)

Generates a URL from the given parameters.

Parameters

string $name The name of the route
mixed $parameters An array of parameters
int $referenceType The type of reference (one of the constants in UrlGeneratorInterface)

Return Value

string The generated URL

See also

UrlGeneratorInterface

at line 60
string path(string $name, mixed $parameters = array(), bool $relative = false)

Generates a URL reference (as an absolute or relative path) to the route with the given parameters.

Parameters

string $name The name of the route
mixed $parameters An array of parameters
bool $relative Whether to generate a relative or absolute path

Return Value

string The generated URL reference

See also

UrlGeneratorInterface

at line 76
string url(string $name, mixed $parameters = array(), bool $schemeRelative = false)

Generates a URL reference (as an absolute URL or network path) to the route with the given parameters.

Parameters

string $name The name of the route
mixed $parameters An array of parameters
bool $schemeRelative Whether to omit the scheme in the generated URL reference

Return Value

string The generated URL reference

See also

UrlGeneratorInterface

at line 84
string getName()

Returns the canonical name of this helper.

Return Value

string The canonical name