function notifications_ui_allowed_types in Notifications 5
Same name and namespace in other branches
- 6.4 notifications_ui/notifications_ui.module \notifications_ui_allowed_types()
- 6 notifications_ui/notifications_ui.module \notifications_ui_allowed_types()
- 6.2 notifications_ui/notifications_ui.module \notifications_ui_allowed_types()
- 6.3 notifications_ui/notifications_ui.module \notifications_ui_allowed_types()
Get list of allowed subscriptions types
Checks permissions and settings
Return value
Subscription types allowed for this user
1 call to notifications_ui_allowed_types()
- notifications_ui_user_node in notifications_ui/
notifications_ui.module - Get list of possible and existing subscriptions for user/node
File
- notifications_ui/
notifications_ui.module, line 241 - User Interface for subscriptions modules
Code
function notifications_ui_allowed_types() {
$enabled = variable_get('notifications_ui_types', array());
$allowed = array();
foreach (notifications_subscription_types() as $type => $info) {
if (isset($enabled[$type]) && $enabled[$type] && !empty($info['access']) && user_access($info['access'])) {
$allowed[$type] = $info;
}
}
return $allowed;
}