You are here

class RegisterLazyRouteFilters in Zircon Profile 8

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

Registers all lazy route filters onto the lazy route filter.

Hierarchy

Expanded class hierarchy of RegisterLazyRouteFilters

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

File

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

Namespace

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

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

}

Members

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