StoragePass.php in Devel 8.2
Same filename and directory in other branches
Namespace
Drupal\webprofiler\CompilerFile
webprofiler/src/Compiler/StoragePass.phpView source
<?php
namespace Drupal\webprofiler\Compiler;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
/**
* Class StoragePass
*/
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),
]);
}
}
}
Classes
Name | Description |
---|---|
StoragePass | Class StoragePass |