class DecoratorPass in Devel 8.2
Same name and namespace in other branches
- 8.3 webprofiler/src/Compiler/DecoratorPass.php \Drupal\webprofiler\Compiler\DecoratorPass
- 8 webprofiler/src/Compiler/DecoratorPass.php \Drupal\webprofiler\Compiler\DecoratorPass
- 4.x webprofiler/src/Compiler/DecoratorPass.php \Drupal\webprofiler\Compiler\DecoratorPass
Class DecoratorPass.
Hierarchy
- class \Drupal\webprofiler\Compiler\DecoratorPass implements \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
Expanded class hierarchy of DecoratorPass
1 file declares its use of DecoratorPass
- WebprofilerServiceProvider.php in webprofiler/
src/ WebprofilerServiceProvider.php
File
- webprofiler/
src/ Compiler/ DecoratorPass.php, line 12
Namespace
Drupal\webprofiler\CompilerView source
class DecoratorPass implements CompilerPassInterface {
/**
* {@inheritdoc}
*/
public function process(ContainerBuilder $container) {
// Builds a decorator around plugin.manager.mail.
$definition = $container
->findDefinition('plugin.manager.mail');
$definition
->setPublic(FALSE);
$container
->setDefinition('webprofiler.debug.plugin.manager.mail.default', $definition);
$container
->register('plugin.manager.mail', 'Drupal\\webprofiler\\Mail\\MailManagerWrapper')
->addArgument(new Reference('container.namespaces'))
->addArgument(new Reference('cache.discovery'))
->addArgument(new Reference('module_handler'))
->addArgument(new Reference('config.factory'))
->addArgument(new Reference('logger.factory'))
->addArgument(new Reference('string_translation'))
->addArgument(new Reference('webprofiler.debug.plugin.manager.mail.default'))
->addArgument(new Reference('webprofiler.mail'))
->setProperty('_serviceId', 'plugin.manager.mail');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DecoratorPass:: |
public | function | You can modify the container here before it is dumped to PHP code. |