function MailManager::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Mail/MailManager.php \Drupal\Core\Mail\MailManager::__construct()
- 8.9.x core/lib/Drupal/Core/Mail/MailManager.php \Drupal\Core\Mail\MailManager::__construct()
- 10 core/lib/Drupal/Core/Mail/MailManager.php \Drupal\Core\Mail\MailManager::__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\Render\RendererInterface $renderer: The renderer.
Overrides DefaultPluginManager::__construct
File
-
core/
lib/ Drupal/ Core/ Mail/ MailManager.php, line 82
Class
- MailManager
- Provides a Mail plugin manager.
Namespace
Drupal\Core\MailCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory, LoggerChannelFactoryInterface $logger_factory, TranslationInterface $string_translation, RendererInterface $renderer) {
parent::__construct('Plugin/Mail', $namespaces, $module_handler, 'Drupal\\Core\\Mail\\MailInterface', Mail::class, '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->renderer = $renderer;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.