function views_data_export_plugin_style_export::render_body

cis7 views_data_export_plugin_style_export.inc views_data_export_plugin_style_export::render_body()
mooc7 views_data_export_plugin_style_export.inc views_data_export_plugin_style_export::render_body()
1 call to views_data_export_plugin_style_export::render_body()
views_data_export_plugin_style_export::render in sites/all/modules/local_contrib/views_data_export/plugins/views_data_export_plugin_style_export.inc
Render the display in this style.

File

sites/all/modules/local_contrib/views_data_export/plugins/views_data_export_plugin_style_export.inc, line 248
Plugin include file for export style plugin.

Class

views_data_export_plugin_style_export
Generalized style plugin for export plugins.

Code

function render_body() {
  if ($this->uses_row_plugin() && empty($this->row_plugin)) {
    vpr('views_plugin_style_default: Missing row plugin');
    return;
  }

  // Group the rows according to the grouping field, if specified.
  $sets = $this->render_grouping($this->view->result, $this->options['grouping']);

  // Render each group separately and concatenate.  Plugins may override this
  // method if they wish some other way of handling grouping.
  $output = '';
  foreach ($sets as $title => $records) {
    if ($this->uses_row_plugin()) {
      $rows = array();
      foreach ($records as $row_index => $row) {
        $this->view->row_index = $row_index;
        $rows[] = $this->row_plugin->render($row);
      }
    }
    else {
      $rows = $records;
    }

    $title = '';
    $output .= theme($this->theme_functions($this->definition['additional themes base'] . '_body'), array('view' => $this->view, 'options' => $this->options, 'rows' => $rows, 'title' => $title));
  }
  unset($this->view->row_index);
  return $output;

}