W3cubDocs

/Drupal 8

public function MailManager::__construct

public MailManager::__construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory, LoggerChannelFactoryInterface $logger_factory, TranslationInterface $string_translation)

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.

Overrides DefaultPluginManager::__construct

File

core/lib/Drupal/Core/Mail/MailManager.php, line 63

Class

MailManager
Provides a Mail plugin manager.

Namespace

Drupal\Core\Mail

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory, LoggerChannelFactoryInterface $logger_factory, TranslationInterface $string_translation) {
  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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Mail!MailManager.php/function/MailManager::__construct/8.1.x