function notifications_event_types in Notifications 5
Same name and namespace in other branches
- 6.4 notifications.module \notifications_event_types()
- 6 notifications.module \notifications_event_types()
- 6.2 notifications.module \notifications_event_types()
- 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.
- notifications_admin_events_form in ./
notifications.admin.inc - Event configuration administration
- Notifications_Content_Tests::testNotificationsContent in tests/
notifications_content.test - Play with creating, retrieving, deleting a pair subscriptions
- notifications_digest_line in ./
notifications.cron.inc - Digest each line, with some caching for performance
- notifications_event_text in ./
notifications.cron.inc - Get texts for event
File
- ./
notifications.module, line 862 - 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;
}
notifications_alter('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;
}
}