function tripal_views_views_pre_render

2.x tripal_views.views.inc tripal_views_views_pre_render(&$view)
1.x tripal_views.views.inc tripal_views_views_pre_render(&$view)

Implements hook_views_pre_render

Purpose: Intercepts the view after the query has been executed All the results are stored in $view->result Looking up the NID here ensures the query is only executed once for all stocks in the table.

@todo add if !<chado/drupal same db> around NID portion

File

tripal_views/tripal_views.views.inc, line 193
Tripal Views Integration

Code

function tripal_views_views_pre_render(&$view) {

  // We need to unset the exposed_input for the view so we can repopulate that
  // variable. This is necessary if we're using the file_upload_combo
  // custom form element which adds the file_path variable to the $_GET after the
  // view has populated the $view->exposed_input variable
  unset($view->exposed_input);

  // we want to add to the bottom of the views the form for downloading
  // results in other formats (e.g. Excel, FASTA, CSV, etc.).  The Views Data
  // Export module provides small images at the bottom, but we want to provide
  // a more intutitive interface for getting different file formats
  $form = drupal_get_form('tripal_views_data_export_download_form', $view, $display_id, $args);
  $view->attachment_after = $form;
}