Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 11 |
RegisterLazyRouteEnhancers | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 11 |
process | |
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 11 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\Core\DependencyInjection\Compiler\RegisterLazyRouteEnhancers. | |
*/ | |
namespace Drupal\Core\DependencyInjection\Compiler; | |
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
/** | |
* Registers all lazy route enhancers onto the lazy route enhancers. | |
*/ | |
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); | |
} | |
} |