public function DecoratorPass::process in Devel 4.x
Same name and namespace in other branches
- 8.3 webprofiler/src/Compiler/DecoratorPass.php \Drupal\webprofiler\Compiler\DecoratorPass::process()
- 8 webprofiler/src/Compiler/DecoratorPass.php \Drupal\webprofiler\Compiler\DecoratorPass::process()
- 8.2 webprofiler/src/Compiler/DecoratorPass.php \Drupal\webprofiler\Compiler\DecoratorPass::process()
File
- webprofiler/
src/ Compiler/ DecoratorPass.php, line 17
Class
- DecoratorPass
- Class DecoratorPass.
Namespace
Drupal\webprofiler\CompilerCode
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');
}