You are here

public function TwigExtension::setUrlGenerator in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::setUrlGenerator()

Sets the URL generator.

Parameters

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

Return value

$this

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 95
Contains \Drupal\Core\Template\TwigExtension.

Class

TwigExtension
A class providing Drupal Twig extensions.

Namespace

Drupal\Core\Template

Code

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