You are here

public function DecoratorPass::process in Devel 8.2

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Compiler/DecoratorPass.php \Drupal\webprofiler\Compiler\DecoratorPass::process()
  2. 8 webprofiler/src/Compiler/DecoratorPass.php \Drupal\webprofiler\Compiler\DecoratorPass::process()
  3. 4.x 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\Compiler

Code

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');
}