You are here

function og_node_create_links_content_type_render in Organic groups 7

Same name and namespace in other branches
  1. 7.2 plugins/content_types/node_create_links/node_create_links.inc \og_node_create_links_content_type_render()

Render callback.

File

plugins/content_types/node_create_links/node_create_links.inc, line 19

Code

function og_node_create_links_content_type_render($subtype, $conf, $args, $context) {
  if (empty($context->data)) {
    return FALSE;
  }
  $group = $context->data;
  $links = og_node_create_links($group->gid, '', !empty($conf['types']) ? $conf['types'] : NULL);
  if (!$links) {
    return FALSE;
  }
  $module = 'og';
  $block = new stdClass();
  $block->module = $module;
  $block->title = t('Content create links');
  $block->content = $links;
  return $block;
}