You are here

public function MimeMail::__construct in Mime Mail 8

MimeMail plugin constructor.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory service.

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

\Drupal\Component\Utility\EmailValidatorInterface $email_validator: The email validator service.

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

Overrides PhpMail::__construct

File

src/Plugin/Mail/MimeMail.php, line 65

Class

MimeMail
Defines the default Drupal mail backend, using PHP's native mail() function.

Namespace

Drupal\mimemail\Plugin\Mail

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, EmailValidatorInterface $email_validator, RendererInterface $renderer) {

  // Bypass parent constructor because the parent statically initializes
  // $this->configFactory (defined in the parent) instead of injecting it.
  $this->configFactory = $config_factory;
  $this->moduleHandler = $module_handler;
  $this->emailValidator = $email_validator;
  $this->renderer = $renderer;
}