function tripal_views_handler_area_collections::render

3.x tripal_views_handler_area_collections.inc tripal_views_handler_area_collections::render($empty = FALSE)

Implements views_handler_area_result::render().

File

tripal/views_handlers/tripal_views_handler_area_collections.inc, line 12

Class

tripal_views_handler_area_collections

Code

function render($empty = FALSE) {

  // If collections are dispabled then don't show anything.
  $collections_enabled = variable_get('tripal_data_collections_enabled', 1);
  if (!$collections_enabled) {
    return '';
  }

  // This will only work with Tripal content types and the tripal_views_query
  // plugin. So don't show anything for others.
  if ($this->query->plugin_name != 'tripal_views_query') {
    return '';
  }
  $form = drupal_get_form('tripal_views_handler_area_collections_form', $this->view, $this->query);
  return drupal_render($form);
}