public function TwigExtension::setUrlGenerator in Drupal 8
Sets the URL generator.
Parameters
\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The URL generator.
Return value
$this
Deprecated
in drupal:8.3.0 and is removed from drupal:9.0.0.
1 call to TwigExtension::setUrlGenerator()
- TwigExtension::setGenerators in core/
lib/ Drupal/ Core/ Template/ TwigExtension.php - Sets the URL generator.
File
- core/
lib/ Drupal/ Core/ Template/ TwigExtension.php, line 99
Class
- TwigExtension
- A class providing Drupal Twig extensions.
Namespace
Drupal\Core\TemplateCode
public function setUrlGenerator(UrlGeneratorInterface $url_generator) {
$this->urlGenerator = $url_generator;
return $this;
}