Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate PHP Method

generate() public method

If the generator is not able to generate the url, it must throw the RouteNotFoundException as documented below.
public generate ( string $name, mixed $parameters = [], boolean $absolute = false ) : string
$name string The name of the route
$parameters mixed An array of parameters
$absolute boolean Whether to generate an absolute URL
return string The generated URL
    public function generate($name, $parameters = array(), $absolute = false);

Usage Example

 /**
  * {@inheritdoc}
  */
 public function mapPath($path, $build, $development)
 {
     if (substr($path, 0, 1) === '/') {
         return $path;
     }
     return $this->urlGenerator->generate('tq_extjs_application_resources', ['build' => $build, 'dev' => $development ? '-dev' : '', 'path' => str_replace('..', '~', $path)]);
 }
All Usage Examples Of Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate
UrlGeneratorInterface