public ContextProvidersPass::process(ContainerBuilder $container)
Passes the service IDs of all context providers to the context repository.
Overrides CompilerPassInterface::process
public function process(ContainerBuilder $container) { $context_providers = []; foreach (array_keys($container->findTaggedServiceIds('context_provider')) as $id) { $context_providers[] = $id; } $definition = $container->getDefinition('context.repository'); $definition->addArgument($context_providers); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!DependencyInjection!Compiler!ContextProvidersPass.php/function/ContextProvidersPass::process/8.1.x