3 namespace Drupal\Core\DependencyInjection\Compiler;
5 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6 use Symfony\Component\DependencyInjection\ContainerBuilder;
9 * Registers all lazy route enhancers onto the lazy route enhancers.
11 class RegisterLazyRouteEnhancers implements CompilerPassInterface {
16 public function process(ContainerBuilder $container) {
17 if (!$container->hasDefinition('route_enhancer.lazy_collector')) {
23 foreach ($container->findTaggedServiceIds('route_enhancer') as $id => $attributes) {
24 $service_ids[$id] = $id;
28 ->getDefinition('route_enhancer.lazy_collector')
29 ->addArgument($service_ids);