class PostMailSendEvent in Commerce Core 8.2
Provides the event dispatched after sending emails via the mail handler.
Note that there's no matching PreMailSendEvent as this is already covered by the hook_mail_alter().
Hierarchy
- class \Drupal\commerce\EventBase extends \Drupal\Component\EventDispatcher\Event
- class \Drupal\commerce\Event\PostMailSendEvent
Expanded class hierarchy of PostMailSendEvent
See also
\Drupal\commerce\Event\CommerceEvents
2 files declare their use of PostMailSendEvent
- MailHandler.php in src/
MailHandler.php - OrderMailEventSubscriber.php in modules/
log/ src/ EventSubscriber/ OrderMailEventSubscriber.php
File
- src/
Event/ PostMailSendEvent.php, line 15
Namespace
Drupal\commerce\EventView source
class PostMailSendEvent extends EventBase {
/**
* The email parameters.
*
* @var array
*/
protected $params;
/**
* The message array.
*
* @var array
*/
protected $message;
/**
* Constructs a new PostMailSendEvent object.
*
* @param array $params
* An array of emails parameters.
* @param array $message
* The $message array structure containing all details of the message. If
* already sent ($send = TRUE), then the 'result' element will contain the
* success indicator of the email, failure being already written to the
* watchdog.
*/
public function __construct(array $params, array $message) {
$this->params = $params;
$this->message = $message;
}
/**
* Gets the email parameters.
*
* @return array
* An array of emails parameters.
*/
public function getParams() {
return $this->params;
}
/**
* Gets the message array.
*
* @return array
* The $message array structure containing all details of the message. If
* already sent ($send = TRUE), then the 'result' element will contain the
* success indicator of the email, failure being already written to the
* watchdog.
*/
public function getMessage() {
return $this->message;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PostMailSendEvent:: |
protected | property | The message array. | |
PostMailSendEvent:: |
protected | property | The email parameters. | |
PostMailSendEvent:: |
public | function | Gets the message array. | |
PostMailSendEvent:: |
public | function | Gets the email parameters. | |
PostMailSendEvent:: |
public | function | Constructs a new PostMailSendEvent object. |