You are here

public function Email::__construct in Message Notify 8

Constructs the email notifier plugin.

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\Logger\LoggerChannelInterface $logger: The message_notify logger channel.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.

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

\Drupal\message\MessageInterface $message: (optional) The message entity. This is required when sending or delivering a notification. If not passed to the constructor, use ::setMessage().

\Drupal\Core\Mail\MailManagerInterface $mail_manager: The mail manager service.

Overrides MessageNotifierBase::__construct

File

src/Plugin/Notifier/Email.php, line 57

Class

Email
Email notifier.

Namespace

Drupal\message_notify\Plugin\Notifier

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerChannelInterface $logger, EntityTypeManagerInterface $entity_type_manager, RendererInterface $render, MessageInterface $message = NULL, MailManagerInterface $mail_manager) {

  // Set configuration defaults.
  $configuration += [
    'mail' => FALSE,
    'language override' => FALSE,
    'from' => FALSE,
  ];
  parent::__construct($configuration, $plugin_id, $plugin_definition, $logger, $entity_type_manager, $render, $message);
  $this->mailManager = $mail_manager;
}