You are here

function notifications_event_types in Notifications 6

Same name and namespace in other branches
  1. 5 notifications.module \notifications_event_types()
  2. 6.4 notifications.module \notifications_event_types()
  3. 6.2 notifications.module \notifications_event_types()
  4. 6.3 notifications.module \notifications_event_types()

Get event types

6 calls to notifications_event_types()
nofitications_digest_event_info in ./notifications.cron.inc
Get digest information for an event.
NotificationsContentTests::testNotificationsContent in tests/notifications_content.test
Play with creating, retrieving, deleting a pair subscriptions
NotificationsTemplatesTests::testNotificationsTemplates in tests/notifications_templates.test
Play with creating, retrieving, deleting a pair subscriptions
notifications_admin_events_form in ./notifications.admin.inc
Event configuration administration
notifications_digest_line in ./notifications.cron.inc
Digest each line, with some caching for performance

... See full list

File

./notifications.module, line 1198
Notifications module

Code

function notifications_event_types($type = NULL, $action = NULL) {
  static $info;
  if (!$info) {
    $types = notifications_module_information('event types');
    foreach ($types as $type_info) {
      $info[$type_info['type']][$type_info['action']] = $type_info;
    }
    drupal_alter('notifications_event_types', $info);
  }
  if ($action) {
    return isset($info[$type][$action]) ? $info[$type][$action] : array();
  }
  elseif ($type) {
    return isset($info[$type]) ? $info[$type] : array();
  }
  else {
    return $info;
  }
}