You are here

function _notifications_content_type_options in Notifications 7

Same name and namespace in other branches
  1. 6.4 notifications_content/notifications_content.module \_notifications_content_type_options()
  2. 6 notifications_content/notifications_content.module \_notifications_content_type_options()
  3. 6.2 notifications_content/notifications_content.module \_notifications_content_type_options()
  4. 6.3 notifications_content/notifications_content.module \_notifications_content_type_options()

List (enabled) subscription options for content types

Parameters

$enabled: Whether to get only enabled subscription types or all of them

2 calls to _notifications_content_type_options()
notifications_content_form_node_type_form_alter in notifications_content/notifications_content.module
Implements hook_form_FORM_ID_alter().
theme_notifications_content_type_settings in notifications_content/notifications_content.admin.inc
Theme content type settings

File

notifications_content/notifications_content.module, line 642
Subscriptions to content events

Code

function _notifications_content_type_options($enabled = TRUE) {
  $types = array();
  foreach (notifications_subscription_type() as $stype => $info) {
    if (!empty($info['object_types']) && (in_array('node', $info['object_types']) || in_array('node_type', $info['object_types']))) {
      $types[$stype] = $info['title'];
    }
  }
  return $types;
}