You are here

function notifications_scheduler_notifications in Notifications 7

Implements hook_notifications().

File

notifications_scheduler/notifications_scheduler.module, line 55
Notifications scheduler module

Code

function notifications_scheduler_notifications($op) {
  switch ($op) {
    case 'event types':
      $types['notifications_scheduler_latest_posts'] = array(
        'object' => 'node_list',
        'scheduler' => TRUE,
        'title' => t('Latest posts'),
        'class' => 'Notifications_Scheduler_Latest_Posts',
        'template' => 'notifications_content-node_list',
        // Type of trigger that throws these events
        'triggers' => array(
          'job_scheduler' => array(
            'any',
          ),
        ),
        'actions' => array(
          'notifications_scheduler_latest_posts_action',
        ),
        'configurable' => TRUE,
      );
      $types['notifications_scheduler_new_posts'] = array(
        'object' => 'node_list',
        'scheduler' => TRUE,
        'title' => t('New posts'),
        'class' => 'Notifications_Scheduler_New_Posts',
        'template' => 'notifications_content-node_list',
        // Type of trigger that throws these events
        'triggers' => array(
          'job_scheduler' => array(
            'any',
          ),
        ),
        'actions' => array(
          'notifications_scheduler_new_posts_action',
        ),
        'configurable' => TRUE,
      );
      return $types;
  }
}