function notifications_ui_block in Notifications 6.4
Same name and namespace in other branches
- 5 notifications_ui/notifications_ui.module \notifications_ui_block()
- 6 notifications_ui/notifications_ui.module \notifications_ui_block()
- 6.2 notifications_ui/notifications_ui.module \notifications_ui_block()
- 6.3 notifications_ui/notifications_ui.module \notifications_ui_block()
Implementation of hook_block()
This block is just for registered users. For anonymous see notifications_anonymous module.
File
- notifications_ui/
notifications_ui.module, line 326 - User Interface for subscriptions modules
Code
function notifications_ui_block($op = 'list', $delta = 0) {
if ($op == 'list') {
$blocks[0]['info'] = t('Subscriptions');
$blocks[0]['cache'] = BLOCK_NO_CACHE;
return $blocks;
}
else {
if ($op == 'view' && notifications_ui_user_access()) {
// Only return block if we have something for it
if ($options = notifications_ui_page_options('block')) {
$block['subject'] = t('Subscriptions');
$block['content'] = drupal_get_form('notifications_subscriptions_options_form', $options);
return $block;
}
}
}
}