You are here

function notifications_ui_allowed_types in Notifications 6.4

Same name and namespace in other branches
  1. 5 notifications_ui/notifications_ui.module \notifications_ui_allowed_types()
  2. 6 notifications_ui/notifications_ui.module \notifications_ui_allowed_types()
  3. 6.2 notifications_ui/notifications_ui.module \notifications_ui_allowed_types()
  4. 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

File

notifications_ui/notifications_ui.module, line 293
User Interface for subscriptions modules

Code

function notifications_ui_allowed_types() {
  $allowed = array();
  foreach (notifications_subscription_types() as $type => $info) {
    if (notifications_ui_type_enabled($type) && !empty($info['access']) && user_access($info['access'])) {
      $allowed[$type] = $info;
    }
  }
  return $allowed;
}