public function __construct(ContainerInterface $container, \Twig_LoaderInterface $loader = null, $options = array()) { parent::__construct($loader, $options); foreach ($container->findAnnotatedServiceIds('twig.extension') as $id => $attributes) { $this->addExtension($container->get($id)); } }
public function __construct(ContainerInterface $container) { foreach ($container->findAnnotatedServiceIds('kernel.listener') as $id => $attributes) { $container->get($id)->register($this); } }