function notifications_subscription_enabled_types in Notifications 7
Get enabled subscription types
3 calls to notifications_subscription_enabled_types()
- notifications_subscription_user_types in ./
notifications.module - Get subscription type objects available for a user or current user
- notifications_ui_form_alter in notifications_ui/
notifications_ui.module - Implementation of hook_form_alter()
- notifications_ui_menu in notifications_ui/
notifications_ui.module - Implementation of hook_menu()
File
- ./
notifications.module, line 882 - Notifications module
Code
function notifications_subscription_enabled_types($type = NULL, $reset = FALSE) {
$types =& drupal_static(__FUNCTION__, NULL, $reset);
if (!isset($types)) {
$types = array();
foreach (notifications_subscription_type() as $key => $info) {
if (empty($info['disabled']) && notifications_subscription_type_enabled($key)) {
$types[$key] = notifications_subscription($key);
}
}
}
return $type ? $types[$type] : $types;
}