You are here

function views_data_export_plugin_display_export::render in Views data export 6.3

Same name and namespace in other branches
  1. 6 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::render()
  2. 6.2 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::render()
  3. 7.4 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::render()
  4. 7 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::render()
  5. 7.3 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::render()

Render the display.

We basically just work out if we should be rendering the header, body or footer and call the appropriate functions on the style plugins.

File

plugins/views_data_export_plugin_display_export.inc, line 357
Contains the bulk export display plugin.

Class

views_data_export_plugin_display_export
The plugin that batches its rendering.

Code

function render() {
  if (!$this
    ->is_batched()) {
    $result = parent::render();
    if (empty($this->view->live_preview)) {
      $this
        ->add_http_headers();
    }
    return $result;
  }
  $this->view
    ->build();
  switch ($this->batched_execution_state->batch_state) {
    case VIEWS_DATA_EXPORT_BODY:
      $output = $this->view->style_plugin
        ->render_body();
      break;
    case VIEWS_DATA_EXPORT_HEADER:
      $output = $this->view->style_plugin
        ->render_header();
      break;
    case VIEWS_DATA_EXPORT_FOOTER:
      $output = $this->view->style_plugin
        ->render_footer();
      break;
  }
  return $output;
}