You are here

public function EmailAction::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php \Drupal\Core\Action\Plugin\Action\EmailAction::__construct()
  2. 10 core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php \Drupal\Core\Action\Plugin\Action\EmailAction::__construct()

Constructs an 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\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

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

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

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

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

Overrides ConfigurableActionBase::__construct

File

core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php, line 94

Class

EmailAction
Sends an email message.

Namespace

Drupal\Core\Action\Plugin\Action

Code

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