protected function Notifications_Scheduler_Event::process_group in Notifications 7
Process group, add all to a message and send out
1 call to Notifications_Scheduler_Event::process_group()
- Notifications_Scheduler_Event::process in notifications_scheduler/
notifications_scheduler.inc - Process event, send pending notifications. Subscriptions start on $counter (min sid)
File
- notifications_scheduler/
notifications_scheduler.inc, line 128 - Drupal Notifications Framework - Default class file
Class
- Notifications_Scheduler_Event
- Notifications Schedule Event class
Code
protected function process_group($group) {
$result = array(
'messages' => 0,
'items' => 0,
'errors' => 0,
);
$message = $this
->build_message();
foreach ($group as $item) {
if ($destination = $item
->get_destination()) {
$message
->add_destination($destination);
}
else {
$result['errors']++;
}
$result['items']++;
}
if ($message
->send()) {
$result['messages']++;
}
return $result;
}