public function DynamicRouter::generate

Generates a URL from the given parameters.

If the generator is not able to generate the url, it must throw the RouteNotFoundException as documented below.

@api

Parameters

string $name The name of the route:

mixed $parameters An array of parameters:

Boolean $absolute Whether to generate an absolute URL:

Return value

string The generated URL

Throws

RouteNotFoundException if route doesn't exist

Overrides UrlGeneratorInterface::generate

File

drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/DynamicRouter.php, line 132

Class

DynamicRouter
A flexible router accepting matcher and generator through injection and using the RouteEnhancer concept to generate additional data on the routes.

Namespace

Symfony\Cmf\Component\Routing

Code

public function generate($name, $parameters = array(), $absolute = false) {
  return $this
    ->getGenerator()
    ->generate($name, $parameters, $absolute);
}