function _notifications_content_type_options in Notifications 6.4
Same name and namespace in other branches
- 6 notifications_content/notifications_content.module \_notifications_content_type_options()
- 6.2 notifications_content/notifications_content.module \_notifications_content_type_options()
- 6.3 notifications_content/notifications_content.module \_notifications_content_type_options()
- 7 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
3 calls to _notifications_content_type_options()
- notifications_content_form_alter in notifications_content/
notifications_content.module - Implementation of hook_form_alter().
- notifications_content_settings_form in notifications_content/
notifications_content.pages.inc - Admin settings form
- theme_notifications_content_type_settings in notifications_content/
notifications_content.pages.inc - Theme content type settings
File
- notifications_content/
notifications_content.module, line 650 - Subscriptions to content events
Code
function _notifications_content_type_options($enabled = TRUE) {
if ($types = notifications_subscription_types()) {
if ($enabled) {
$types = array_intersect_key($types, notifications_subscription_type_enabled());
}
if ($types) {
// Only node subscriptions
if ($types = notifications_array_filter($types, array(
'event_type' => 'node',
))) {
if ($types = notifications_array_filter($types, array(
'custom' => TRUE,
), TRUE)) {
return array_map('notifications_format_title_description', $types);
}
}
}
}
return array();
}