You are here

function notifications_lite_notifications_post in Notifications 6.3

Post message using notifications

Parameters

unknown_type $accounts:

unknown_type $message:

unknown_type $params:

Return value

int Number of messages sent

1 call to notifications_lite_notifications_post()
notifications_lite_send in notifications_lite/notifications_lite.module
Sends out a notification for a user

File

notifications_lite/notifications_lite.module, line 80
Simple notifications API

Code

function notifications_lite_notifications_post($accounts, $message, $params) {
  $event = notifications_lite_event($message, $params, count($accounts));
  foreach ($accounts as $account) {
    $result = notifications_lite_queue($account, $event);
  }

  // Notify other modules, try inmediate sending
  notifications_module_invoke('event queued', $event);
  notifications_send_immediate($event->eid);
  return count($result);
}