public function TwigExtenderServiceProvider::alter in Twig Extender 8
Same name and namespace in other branches
- 8.4 src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider::alter()
- 8.2 src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider::alter()
- 8.3 src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider::alter()
- 4.x src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider::alter()
Modifies existing service definitions.
Parameters
ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.
Overrides ServiceProviderBase::alter
File
- src/
TwigExtenderServiceProvider.php, line 17
Class
- TwigExtenderServiceProvider
- Modifies the language manager service.
Namespace
Drupal\twig_extenderCode
public function alter(ContainerBuilder $container) {
$definition = $container
->getDefinition('twig.extension');
$definition
->setClass('\\Drupal\\twig_extender\\TwigExtenderService');
$definition
->addArgument(new Reference('plugin.manager.twig_extender'));
}