You are here

public function StoragePass::process in Devel 8.3

Same name and namespace in other branches
  1. 8 webprofiler/src/Compiler/StoragePass.php \Drupal\webprofiler\Compiler\StoragePass::process()
  2. 8.2 webprofiler/src/Compiler/StoragePass.php \Drupal\webprofiler\Compiler\StoragePass::process()
  3. 4.x webprofiler/src/Compiler/StoragePass.php \Drupal\webprofiler\Compiler\StoragePass::process()

File

webprofiler/src/Compiler/StoragePass.php, line 17

Class

StoragePass
Class StoragePass.

Namespace

Drupal\webprofiler\Compiler

Code

public function process(ContainerBuilder $container) {
  if (FALSE === $container
    ->hasDefinition('profiler.storage_manager')) {
    return;
  }
  $definition = $container
    ->getDefinition('profiler.storage_manager');
  foreach ($container
    ->findTaggedServiceIds('webprofiler_storage') as $id => $attributes) {
    $definition
      ->addMethodCall('addStorage', [
      $id,
      $attributes[0]['title'],
      new Reference($id),
    ]);
  }
}