You are here

function notifications_event_types in Notifications 6.4

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

Get event types. Invoking this function will also load the event API

Parameters

$typekey: Event type key

$property: Property to return

$enabled: Whether to return also disabled events

8 calls to notifications_event_types()
NotificationsContentTests::testNotificationsContent in tests/notifications_content.test
Play with creating, retrieving, deleting a pair subscriptions
notifications_admin_events_form in ./notifications.admin.inc
Event configuration administration
notifications_digest_event_template in notifications_digest/notifications_digest.module
Get template name for digesting event
notifications_digest_get_templates in notifications_digest/notifications_digest.module
Get templates for digesting
Notifications_Event::get_type in includes/notifications_event.class.inc
Get event type information

... See full list

File

./notifications.module, line 1358
Notifications module

Code

function notifications_event_types($typekey = NULL, $property = NULL, $disabled = TRUE) {
  $info =& notifications_info('event types');
  $enabled =& messaging_static(__FUNCTION__ . '_enabled');
  if (!isset($enabled)) {
    $enabled = array();
    foreach ($info as $key => &$event) {
      if (empty($event['disabled']) && notifications_event_enabled($key)) {
        $enabled[$key] =& $event;
      }
    }
  }
  return $disabled ? notifications_array_info($info, $typekey, $property) : notifications_array_info($enabled, $typekey, $property);
}