You are here

public function TwigExtenderService::__construct in Twig Extender 8.4

Same name and namespace in other branches
  1. 8 src/TwigExtenderService.php \Drupal\twig_extender\TwigExtenderService::__construct()
  2. 8.2 src/TwigExtenderService.php \Drupal\twig_extender\TwigExtenderService::__construct()
  3. 8.3 src/TwigExtenderService.php \Drupal\twig_extender\TwigExtenderService::__construct()
  4. 4.x src/TwigExtenderService.php \Drupal\twig_extender\TwigExtenderService::__construct()

Construtor.

Overrides TwigExtension::__construct

File

src/TwigExtenderService.php, line 20

Class

TwigExtenderService
Service Provider Class for TwigExtesion Plugins.

Namespace

Drupal\twig_extender

Code

public function __construct(RendererInterface $renderer, UrlGeneratorInterface $url_generator, ThemeManagerInterface $theme_manager, DateFormatterInterface $date_formatter, TwigPluginManagerInterface $manager) {
  parent::__construct($renderer, $url_generator, $theme_manager, $date_formatter);
  $this->pluginManager = $manager;
  $this->plugins = $this->pluginManager
    ->getDefinitions();
}