public function MailManagerWrapper::__construct in Devel 8
Same name and namespace in other branches
- 8.3 webprofiler/src/Mail/MailManagerWrapper.php \Drupal\webprofiler\Mail\MailManagerWrapper::__construct()
- 8.2 webprofiler/src/Mail/MailManagerWrapper.php \Drupal\webprofiler\Mail\MailManagerWrapper::__construct()
- 4.x webprofiler/src/Mail/MailManagerWrapper.php \Drupal\webprofiler\Mail\MailManagerWrapper::__construct()
Constructs the MailManager object.
Parameters
\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.
\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger channel factory.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.
\Drupal\Core\Mail\MailManagerInterface $mailManager:
\Drupal\webprofiler\DataCollector\MailDataCollector $dataCollector:
Overrides DefaultPluginManager::__construct
File
- webprofiler/
src/ Mail/ MailManagerWrapper.php, line 72
Class
- MailManagerWrapper
- Class MailManagerWrapper
Namespace
Drupal\webprofiler\MailCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory, LoggerChannelFactoryInterface $logger_factory, TranslationInterface $string_translation, MailManagerInterface $mailManager, MailDataCollector $dataCollector) {
parent::__construct('Plugin/Mail', $namespaces, $module_handler, 'Drupal\\Core\\Mail\\MailInterface', 'Drupal\\Core\\Annotation\\Mail');
$this
->alterInfo('mail_backend_info');
$this
->setCacheBackend($cache_backend, 'mail_backend_plugins');
$this->configFactory = $config_factory;
$this->loggerFactory = $logger_factory;
$this->stringTranslation = $string_translation;
$this->dataCollector = $dataCollector;
$this->mailManager = $mailManager;
}