You are here

public function FilterTwig::__construct in Filter Twig 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Filter/FilterTwig.php \Drupal\filter_twig\Plugin\Filter\FilterTwig::__construct()

Constructs a filter twig plugin.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition. The token service. The token entity mapper service.

\Drupal\Core\Render\RendererInterface $renderer: The renderer service.

Overrides FilterBase::__construct

File

src/Plugin/Filter/FilterTwig.php, line 44

Class

FilterTwig
Provides a filter that replaces twig values.

Namespace

Drupal\filter_twig\Plugin\Filter

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, RendererInterface $renderer) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->renderer = $renderer;
}