You are here

public function HtmlMailSystem::__construct in HTML Mail 8.3

Same name and namespace in other branches
  1. 8 src/Plugin/Mail/HTMLMailSystem.php \Drupal\htmlmail\Plugin\Mail\HTMLMailSystem::__construct()

HtmlMailSystem constructor.

Parameters

array $configuration: The configuration array.

int $plugin_id: Plugin ID.

string $plugin_definition: Plugin definition.

\Egulias\EmailValidator\EmailValidator $emailValidator: The email validator service.

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: The module handler service.

\Drupal\Core\File\FileSystemInterface $fileSystem: The file system service.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger: The logger service.

\Drupal\Core\Site\Settings $settings: The site settings service.

\Drupal\Core\Render\RendererInterface $renderer: The render service.

\Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface $mimeTypeGuesser: The mime type guesser service.

File

src/Plugin/Mail/HtmlMailSystem.php, line 109

Class

HtmlMailSystem
Modify the Drupal mail system to use HTML Mail when sending emails.

Namespace

Drupal\htmlmail\Plugin\Mail

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EmailValidator $emailValidator, ModuleHandlerInterface $moduleHandler, FileSystemInterface $fileSystem, LoggerChannelFactoryInterface $logger, Settings $settings, RendererInterface $renderer, MimeTypeGuesserInterface $mimeTypeGuesser) {
  $this->emailValidator = $emailValidator;
  $this->moduleHandler = $moduleHandler;
  $this->fileSystem = $fileSystem;
  $this->logger = $logger;
  $this->systemConfig = \Drupal::config('system.site');
  $this->configVariables = \Drupal::config('htmlmail.settings');
  $this->siteSettings = $settings;
  $this->renderer = $renderer;
  $this->mimeType = $mimeTypeGuesser;
  $this->configFactory = \Drupal::configFactory();
}