RouterHelper

class RouterHelper extends Helper

RouterHelper manages links between pages in a template context.

Methods

setCharset(string $charset)

Sets the default charset.

from Helper
string getCharset()

Gets the default charset.

from Helper
__construct(UrlGeneratorInterface $router)
string generate(string $name, mixed $parameters = array(), bool|string $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)

Generates a URL from the given parameters.

string getName()

Returns the canonical name of this helper.

Details

setCharset(string $charset)

Sets the default charset.

Parameters

string $charset The charset

string getCharset()

Gets the default charset.

Return Value

string The default charset

__construct(UrlGeneratorInterface $router)

Parameters

UrlGeneratorInterface $router

string generate(string $name, mixed $parameters = array(), bool|string $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
bool|string $referenceType The type of reference (one of the constants in UrlGeneratorInterface)

Return Value

string The generated URL

See also

UrlGeneratorInterface

string getName()

Returns the canonical name of this helper.

Return Value

string The canonical name

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Bundle/FrameworkBundle/Templating/Helper/RouterHelper.html