class MessageNotifierEmail in Message Notify 7.2
Email notifier.
Hierarchy
- class \MessageNotifierBase implements MessageNotifierInterface
- class \MessageNotifierEmail
Expanded class hierarchy of MessageNotifierEmail
File
- plugins/
notifier/ email/ MessageNotifierEmail.class.php, line 6
View source
class MessageNotifierEmail extends MessageNotifierBase {
public function deliver(array $output = array()) {
$plugin = $this->plugin;
$message = $this->message;
$options = $plugin['options'];
$account = user_load($message->uid);
$mail = $options['mail'] ? $options['mail'] : $account->mail;
$languages = language_list();
if (!$options['language override']) {
$lang = !empty($account->language) && $account->language != LANGUAGE_NONE ? $languages[$account->language] : language_default();
}
else {
$lang = $languages[$message->language];
}
// The subject in an email can't be with HTML, so strip it.
$output['message_notify_email_subject'] = strip_tags($output['message_notify_email_subject']);
// Pass the message entity along to hook_drupal_mail().
$output['message_entity'] = $message;
$result = drupal_mail('message_notify', $message->type, $mail, $lang, $output);
return $result['result'];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MessageNotifierBase:: |
protected | property | The message entity. | |
MessageNotifierBase:: |
protected | property | The plugin definition. | |
MessageNotifierBase:: |
public | function |
Determine if user can access notifier. Overrides MessageNotifierInterface:: |
|
MessageNotifierBase:: |
public | function |
Act upon send result. Overrides MessageNotifierInterface:: |
|
MessageNotifierBase:: |
public | function |
Entry point to send and process a message. Overrides MessageNotifierInterface:: |
|
MessageNotifierBase:: |
public | function |
Constructor for the notifier. Overrides MessageNotifierInterface:: |
|
MessageNotifierEmail:: |
public | function |
Deliver a message via the required transport method. Overrides MessageNotifierBase:: |