You are here

class StoragePass in Devel 8.2

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Compiler/StoragePass.php \Drupal\webprofiler\Compiler\StoragePass
  2. 8 webprofiler/src/Compiler/StoragePass.php \Drupal\webprofiler\Compiler\StoragePass
  3. 4.x webprofiler/src/Compiler/StoragePass.php \Drupal\webprofiler\Compiler\StoragePass

Class StoragePass

Hierarchy

  • class \Drupal\webprofiler\Compiler\StoragePass implements \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface

Expanded class hierarchy of StoragePass

1 file declares its use of StoragePass
WebprofilerServiceProvider.php in webprofiler/src/WebprofilerServiceProvider.php

File

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

Namespace

Drupal\webprofiler\Compiler
View source
class StoragePass implements CompilerPassInterface {

  /**
   * {@inheritdoc}
   */
  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),
      ]);
    }
  }

}

Members

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