You are here

class TwigExtenderServiceProvider in Twig Extender 8

Same name and namespace in other branches
  1. 8.4 src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider
  2. 8.2 src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider
  3. 8.3 src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider
  4. 4.x src/TwigExtenderServiceProvider.php \Drupal\twig_extender\TwigExtenderServiceProvider

Modifies the language manager service.

Hierarchy

Expanded class hierarchy of TwigExtenderServiceProvider

File

src/TwigExtenderServiceProvider.php, line 12

Namespace

Drupal\twig_extender
View 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

Namesort descending Modifiers Type Description Overrides
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1
TwigExtenderServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter