function TwigExtension::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::__construct()
- 10 core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::__construct()
- 9 core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::__construct()
- 8.9.x core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::__construct()
Constructs \Drupal\Core\Template\TwigExtension.
Parameters
\Drupal\Core\Render\RendererInterface $renderer: The renderer.
\Drupal\Core\Routing\UrlGeneratorInterface $urlGenerator: The URL generator.
\Drupal\Core\Theme\ThemeManagerInterface $themeManager: The theme manager.
\Drupal\Core\Datetime\DateFormatterInterface $dateFormatter: The date formatter.
\Drupal\Core\File\FileUrlGeneratorInterface $fileUrlGenerator: The file URL generator.
File
-
core/
lib/ Drupal/ Core/ Template/ TwigExtension.php, line 52
Class
- TwigExtension
- A class providing Drupal Twig extensions.
Namespace
Drupal\Core\TemplateCode
public function __construct(protected RendererInterface $renderer, protected UrlGeneratorInterface $urlGenerator, protected ThemeManagerInterface $themeManager, protected DateFormatterInterface $dateFormatter, protected FileUrlGeneratorInterface $fileUrlGenerator) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.