You are here

function Notifications_Event::queue in Notifications 7

Queue event for later processing

1 call to Notifications_Event::queue()
Notifications_Event::dispatch in ./notifications.event.inc
Dispatch event to where it corresponds

File

./notifications.event.inc, line 310
Drupal Notifications Framework - Default class file

Class

Notifications_Event
Notifications Event class

Code

function queue() {

  // First of all, make sure we have a unique eid
  $this->queued = REQUEST_TIME;
  $this
    ->record(TRUE);

  // If advanced queue enabled, go for it. Otherwise, go for Drupal Queue
  if (function_exists('notifications_queue')) {
    notifications_queue()
      ->queue_event($this);
  }
  else {
    $queue = DrupalQueue::get('notifications_event');
    $queue
      ->createItem($this);
  }

  // Modules can do cleanup operations or modify the queue or the event counter
  $this
    ->invoke_all('queued');
}