class Notifications_Message in Notifications 6.3
Same name and namespace in other branches
- 6.4 includes/notifications_message.class.inc \Notifications_Message
- 7 notifications.message.inc \Notifications_Message
@file Notifications_Message class
Hierarchy
- class \Notifications_Message extends \Messaging_Message
Expanded class hierarchy of Notifications_Message
File
- classes/
notifications_message.class.inc, line 7 - Notifications_Message class
View source
class Notifications_Message extends Messaging_Message {
// Template used
// protected $template = NULL;
// Array with notifications data ('subscriptions', 'events'...)
public $notifications = array();
// Events that produced this notification
/**
* Build from a template and parameters object
*/
function __construct($data = array()) {
$this->type = 'outgoing';
parent::__construct($data);
}
/**
* Set sender uid or user account
*/
function set_sender($uid, $sender_option) {
$sender = notifications_load_user($uid);
switch ($sender_option) {
case 2:
// Full sender account and sender address
parent::set_sender($sender);
break;
case 1:
// Sender name but anything else defaults to system
$this->sender = 0;
$this->sender_name = $sender->name;
break;
default:
// Sender name is site name
$this->sender = 0;
$this->sender_name = variable_get('site_name', 'Drupal');
break;
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Notifications_Message:: |
public | property | ||
Notifications_Message:: |
function | Set sender uid or user account | ||
Notifications_Message:: |
function | Build from a template and parameters object |