function notifications_ui_page_user_add in Notifications 6
Same name and namespace in other branches
- 6.4 notifications_ui/notifications_ui.pages.inc \notifications_ui_page_user_add()
- 6.2 notifications_ui/notifications_ui.pages.inc \notifications_ui_page_user_add()
- 6.3 notifications_ui/notifications_ui.pages.inc \notifications_ui_page_user_add()
User add subscription
1 string reference to 'notifications_ui_page_user_add'
- notifications_ui_menu in notifications_ui/
notifications_ui.module - Implementation of hook_menu()
File
- notifications_ui/
notifications_ui.pages.inc, line 10 - User pages for User Interface for subscriptions modules
Code
function notifications_ui_page_user_add($account, $type = NULL) {
drupal_set_title(t('Add subscription'));
if ($type && notifications_ui_access_user_add($account, $type)) {
module_load_include('inc', 'notifications', 'notifications.pages');
return drupal_get_form('notifications_add_subscription_form', $account, $type);
}
else {
foreach (notifications_ui_subscription_types() as $key => $type) {
if (notifications_ui_access_user_add($account, $key)) {
$options[] = array(
'title' => $type['title'],
'href' => "user/{$account->uid}/notifications/add/{$key}",
'description' => !empty($type['description']) ? $type['description'] : '',
);
}
}
return theme('notifications_ui_add_list', $options);
}
}