function oa_notifications_pane_render in Open Atrium Notifications 7.2
Run-time rendering of the body of the pane.
See also
ctools_plugin_examples for more advanced info
1 string reference to 'oa_notifications_pane_render'
- oa_notifications_pane.inc in plugins/
content_types/ oa_notifications_pane.inc
File
- plugins/
content_types/ oa_notifications_pane.inc, line 20
Code
function oa_notifications_pane_render($subtype, $conf, $args, $context) {
global $user;
if (!isset($context->data) || !variable_get('oa_messages_notifications', TRUE)) {
return FALSE;
}
$node = $context->data;
if (empty($user->uid) || !node_access('view', $node)) {
return FALSE;
}
$form = drupal_get_form('oa_notifications_edit_form', $node);
if (!isset($form[OA_NOTIFY_FORM]['source_id']) && !isset($form[OA_NOTIFY_FORM]['notify_list'])) {
return FALSE;
}
$block = new stdClass();
$block->title = t('Notifications');
$block->content = $form;
return $block;
}