function TwigExtension::setGenerators

Sets the URL generator.

Parameters

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The URL generator.

Return value

$this

Deprecated

in drupal:8.0.0 and is removed from drupal:9.0.0.

File

core/lib/Drupal/Core/Template/TwigExtension.php, line 85

Class

TwigExtension
A class providing Drupal Twig extensions.

Namespace

Drupal\Core\Template

Code

public function setGenerators(UrlGeneratorInterface $url_generator) {
    return $this->setUrlGenerator($url_generator);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.