You are here

public function EmailAction::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/action/src/Plugin/Action/EmailAction.php \Drupal\action\Plugin\Action\EmailAction::__construct()

Constructs a EmailAction object.

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\Utility\Token $token: The token service.

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager.

\Psr\Log\LoggerInterface $logger: A logger instance.

\Drupal\Core\Mail\MailManagerInterface: The mail manager.

\Drupal\Core\Language\LanguageManagerInterface: The language manager.

\Egulias\EmailValidator\EmailValidator $email_validator: The email validator.

Overrides ConfigurableActionBase::__construct

File

core/modules/action/src/Plugin/Action/EmailAction.php, line 98
Contains \Drupal\action\Plugin\Action\EmailAction.

Class

EmailAction
Sends an email message.

Namespace

Drupal\action\Plugin\Action

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, Token $token, EntityManagerInterface $entity_manager, LoggerInterface $logger, MailManagerInterface $mail_manager, LanguageManagerInterface $language_manager, EmailValidator $email_validator) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->token = $token;
  $this->storage = $entity_manager
    ->getStorage('user');
  $this->logger = $logger;
  $this->mailManager = $mail_manager;
  $this->languageManager = $language_manager;
  $this->emailValidator = $email_validator;
}