You are here

protected function WorkbenchTransitionEventSubscriber::prepareRecipients in Workbench Email 2.x

Same name and namespace in other branches
  1. 8 src/EventSubscriber/WorkbenchTransitionEventSubscriber.php \Drupal\workbench_email\EventSubscriber\WorkbenchTransitionEventSubscriber::prepareRecipients()

Prepares the recipient list given the entity and template combination.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: Entity being transitioned.

\Drupal\workbench_email\TemplateInterface $template: Template being used.

Return value

array Array of email addresses to send to.

2 calls to WorkbenchTransitionEventSubscriber::prepareRecipients()
WorkbenchTransitionEventSubscriber::onContentModerationTransition in src/EventSubscriber/WorkbenchTransitionEventSubscriber.php
Event handler for Content Moderation.
WorkbenchTransitionEventSubscriber::onWorkbenchModerationTransition in src/EventSubscriber/WorkbenchTransitionEventSubscriber.php
Event handler for Workbench Moderation.

File

src/EventSubscriber/WorkbenchTransitionEventSubscriber.php, line 172

Class

WorkbenchTransitionEventSubscriber
Subscribes to transition changes to send notification emails.

Namespace

Drupal\workbench_email\EventSubscriber

Code

protected function prepareRecipients(ContentEntityInterface $entity, TemplateInterface $template) {
  return $template
    ->getRecipients($entity);
}