You are here

class RegisterLazyRouteEnhancers in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterLazyRouteEnhancers.php \Drupal\Core\DependencyInjection\Compiler\RegisterLazyRouteEnhancers

Registers all lazy route enhancers onto the lazy route enhancers.

Hierarchy

Expanded class hierarchy of RegisterLazyRouteEnhancers

1 file declares its use of RegisterLazyRouteEnhancers
CoreServiceProvider.php in core/lib/Drupal/Core/CoreServiceProvider.php
Contains \Drupal\Core\CoreServiceProvider.

File

core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterLazyRouteEnhancers.php, line 17
Contains \Drupal\Core\DependencyInjection\Compiler\RegisterLazyRouteEnhancers.

Namespace

Drupal\Core\DependencyInjection\Compiler
View source
class RegisterLazyRouteEnhancers implements CompilerPassInterface {

  /**
   * {@inheritdoc}
   */
  public function process(ContainerBuilder $container) {
    if (!$container
      ->hasDefinition('route_enhancer.lazy_collector')) {
      return;
    }
    $service_ids = [];
    foreach ($container
      ->findTaggedServiceIds('route_enhancer') as $id => $attributes) {
      $service_ids[$id] = $id;
    }
    $container
      ->getDefinition('route_enhancer.lazy_collector')
      ->addArgument($service_ids);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RegisterLazyRouteEnhancers::process public function You can modify the container here before it is dumped to PHP code. Overrides CompilerPassInterface::process