class TwigExtenderServiceProvider in Twig Extender 8.4
Same name and namespace in other branches
- 8 src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider
- 8.2 src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider
- 8.3 src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider
- 4.x src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider
Modifies the language manager service.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\twig_extender\TwigExtenderServiceProvider
Expanded class hierarchy of TwigExtenderServiceProvider
File
- src/
TwigExtenderServiceProvider.php, line 12
Namespace
Drupal\twig_extenderView source
class TwigExtenderServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$definition = $container
->getDefinition('twig.extension');
$definition
->setClass('\\Drupal\\twig_extender\\TwigExtenderService');
$definition
->addArgument(new Reference('plugin.manager.twig_extender'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |
TwigExtenderServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |