You are here

class QueuedEmail in Workbench Email 2.x

Same name and namespace in other branches
  1. 8 src/QueuedEmail.php \Drupal\workbench_email\QueuedEmail

A value object for queued email.

Hierarchy

Expanded class hierarchy of QueuedEmail

2 files declare their use of QueuedEmail
WorkbenchEmailProcessor.php in src/Plugin/QueueWorker/WorkbenchEmailProcessor.php
WorkbenchTransitionEventSubscriber.php in src/EventSubscriber/WorkbenchTransitionEventSubscriber.php

File

src/QueuedEmail.php, line 8

Namespace

Drupal\workbench_email
View source
class QueuedEmail {

  /**
   * Template to use.
   *
   * @var \Drupal\workbench_email\TemplateInterface
   */
  protected $template;

  /**
   * UUID of entity to send.
   *
   * @var string
   */
  protected $uuid;

  /**
   * Email address to send to.
   *
   * @var string
   */
  protected $to;

  /**
   * Constructs a new QueuedEmail object.
   *
   * @param \Drupal\workbench_email\TemplateInterface $template
   *   Template to use.
   * @param string $uuid
   *   Entity to use for token replacement.
   * @param string $to
   *   Email to send to.
   */
  public function __construct(TemplateInterface $template, $uuid, $to) {
    $this->template = $template;
    $this->uuid = $uuid;
    $this->to = $to;
  }

  /**
   * Gets value of template.
   *
   * @return \Drupal\workbench_email\TemplateInterface
   *   Value of template
   */
  public function getTemplate() {
    return $this->template;
  }

  /**
   * Gets value of uuid.
   *
   * @return string
   *   Value of uuid
   */
  public function getUuid() {
    return $this->uuid;
  }

  /**
   * Gets value of to.
   *
   * @return string
   *   Value of to
   */
  public function getTo() {
    return $this->to;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
QueuedEmail::$template protected property Template to use.
QueuedEmail::$to protected property Email address to send to.
QueuedEmail::$uuid protected property UUID of entity to send.
QueuedEmail::getTemplate public function Gets value of template.
QueuedEmail::getTo public function Gets value of to.
QueuedEmail::getUuid public function Gets value of uuid.
QueuedEmail::__construct public function Constructs a new QueuedEmail object.