public function TwigExtenderService::getFilters in Twig Extender 8.2
Same name and namespace in other branches
- 8.4 src/TwigExtenderService.php \Drupal\twig_extender\TwigExtenderService::getFilters()
- 8 src/TwigExtenderService.php \Drupal\twig_extender\TwigExtenderService::getFilters()
- 8.3 src/TwigExtenderService.php \Drupal\twig_extender\TwigExtenderService::getFilters()
- 4.x src/TwigExtenderService.php \Drupal\twig_extender\TwigExtenderService::getFilters()
Load all filter plugins.
Overrides TwigExtension::getFilters
File
- src/
TwigExtenderService.php, line 50
Class
- TwigExtenderService
- Service Provider Class for TwigExtesion Plugins.
Namespace
Drupal\twig_extenderCode
public function getFilters() {
$filters = parent::getFilters();
foreach ($this->plugins as $id => $plugin) {
$plugin = $this->pluginManager
->createInstance($id);
if ($plugin
->getType() != 'filter') {
continue;
}
$filters[] = $plugin
->register();
}
return $filters;
}