function ServicePass::process

File

webprofiler/src/Compiler/ServicePass.php, line 18

Class

ServicePass
Class ServicePass

Namespace

Drupal\webprofiler\Compiler

Code

public function process(ContainerBuilder $container) {
    if (FALSE === $container->hasDefinition('webprofiler.services')) {
        return;
    }
    $definition = $container->getDefinition('webprofiler.services');
    $graph = $container->getCompiler()
        ->getServiceReferenceGraph();
    $definition->addMethodCall('setServices', [
        $this->extractData($container, $graph),
    ]);
}