You are here

function og_panels_ct_render_callback_search in Organic groups 5.8

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

File

includes/groupcontent.inc, line 124

Code

function og_panels_ct_render_callback_search($conf, $panel_args, $context) {
  $node = isset($context->data) ? drupal_clone($context->data) : NULL;
  $block->module = 'og_panels';
  $block->subject = t('Group Search');
  if ($node) {
    if (module_exists('search') && user_access('search content')) {
      $block->content = drupal_get_form('og_search_form', $node);
    }
    $block->delta = $node->nid;
  }
  else {
    $block->content = t('Search form goes here.');
    $block->delta = 'unknown';
  }
  return $block;
}