function notifications_lite_add_to_queue in Notifications 5
Same name and namespace in other branches
- 6.4 notifications_lite/notifications_lite.module \notifications_lite_add_to_queue()
- 6 notifications_lite/notifications_lite.module \notifications_lite_add_to_queue()
- 6.2 notifications_lite/notifications_lite.module \notifications_lite_add_to_queue()
Put simple notification into queue
Parameters
$uid: User id for destination
$subject: Notification subject
$body: Optional notification body
$action: Optional action name, so other modules can define specific message parts for their actions
1 call to notifications_lite_add_to_queue()
- notifications_lite_send in notifications_lite/
notifications_lite.module - Sends out a notification for a user
File
- notifications_lite/
notifications_lite.module, line 78 - Simple notifications API
Code
function notifications_lite_add_to_queue($uid, $subject, $body = '', $action = 'default', $params = array()) {
// Build and store simple event
$event = array(
'module' => 'notifications',
'uid' => 0,
'oid' => $uid,
'type' => 'lite',
'action' => $action,
'params' => array(
'for-uid' => $uid,
'subject' => $subject,
'body' => $body,
),
);
$event['params'] = array_merge($event['params'], $params);
$event = notifications_event($event);
}