You are here

function og_panels_ct_render_callback_mission in Organic groups 5.7

Same name and namespace in other branches
  1. 5.8 includes/groupcontent.inc \og_panels_ct_render_callback_mission()
  2. 5 includes/groupcontent.inc \og_panels_ct_render_callback_mission()
  3. 5.3 includes/groupcontent.inc \og_panels_ct_render_callback_mission()
  4. 6 includes/og.panelscontent.inc \og_panels_ct_render_callback_mission()
1 string reference to 'og_panels_ct_render_callback_mission'
og_panels_panels_content_types in ./og_panels.module
Implementation of hook_panels_content_types()

File

includes/groupcontent.inc, line 64

Code

function og_panels_ct_render_callback_mission($conf, $panel_args, $context) {
  $node = isset($context->data) ? drupal_clone($context->data) : NULL;
  $block->module = 'og_panels';
  $block->subject = t('Welcome');
  if ($node) {

    // This rendering somewhat verbose technique exactly matches og_view_group().
    $value = check_markup($node->body, $node->format, FALSE);
    $form['og_mission'] = array(
      '#theme' => 'og_mission',
      '#value' => $value,
      '#node' => $node,
      '#weight' => -3,
    );
    $block->content = drupal_render($form['og_mission']);
    $block->delta = $node->nid;
  }
  else {
    $block->content = t('Welcome statement goes here.');
    $block->delta = 'unknown';
  }
  return $block;
}