function notifications_content_types in Notifications 7
Same name and namespace in other branches
- 5 notifications_content/notifications_content.module \notifications_content_types()
- 6.4 notifications_content/notifications_content.module \notifications_content_types()
- 6 notifications_content/notifications_content.module \notifications_content_types()
- 6.2 notifications_content/notifications_content.module \notifications_content_types()
- 6.3 notifications_content/notifications_content.module \notifications_content_types()
Get content types available for subscriptions to content type
Parameters
$subs_type: Optional type of subscription for which to find allowed content types. If none, return all content types for which any subscription type is enabled.
2 calls to notifications_content_types()
- NotificationsContentTests::testNotificationsContent in tests/
notifications_content.test - Play with creating, retrieving, deleting a pair subscriptions
- notifications_user_notifications_object_user in notifications_user/
notifications_user.module - Implementation of hook_notifications_object_user()
1 string reference to 'notifications_content_types'
- notifications_content_uninstall in notifications_content/
notifications_content.install - Implementation of hook_uninstall().
File
- notifications_content/
notifications_content.module, line 759 - Subscriptions to content events
Code
function notifications_content_types($subs_type = NULL) {
// Get list of available node types, all of them will be allowed by default
$types = array();
foreach (node_type_get_names() as $key => $name) {
if (notifications_content_type_enabled($key, $subs_type)) {
$types[$key] = $name;
}
}
return $types;
}