You are here

public function WorkbenchEmailProcessor::__construct in Workbench Email 2.x

Same name in this branch
  1. 2.x src/WorkbenchEmailProcessor.php \Drupal\workbench_email\WorkbenchEmailProcessor::__construct()
  2. 2.x src/Plugin/QueueWorker/WorkbenchEmailProcessor.php \Drupal\workbench_email\Plugin\QueueWorker\WorkbenchEmailProcessor::__construct()
Same name and namespace in other branches
  1. 8 src/Plugin/QueueWorker/WorkbenchEmailProcessor.php \Drupal\workbench_email\Plugin\QueueWorker\WorkbenchEmailProcessor::__construct()

Constructs a new WorkbenchEmailProcessor object.

Parameters

array $configuration: Configuration.

string $plugin_id: Plugin ID.

mixed $plugin_definition: Definition.

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

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: Entity repository service.

\Drupal\Core\Utility\Token $token: Token service.

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

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

Overrides PluginBase::__construct

File

src/Plugin/QueueWorker/WorkbenchEmailProcessor.php, line 90

Class

WorkbenchEmailProcessor
Sends emails notifications for workbench events.

Namespace

Drupal\workbench_email\Plugin\QueueWorker

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, MailManagerInterface $mail_manager, EntityRepositoryInterface $entity_repository, Token $token, RendererInterface $renderer, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->mailManager = $mail_manager;
  $this->targetEntityType = $plugin_definition['entity_type'];
  $this->entityRepository = $entity_repository;
  $this->token = $token;
  $this->renderer = $renderer;
  $this->entityTypeManager = $entity_type_manager;
}