function views_data_export_plugin_style_export::render in Views data export 7.4
Same name and namespace in other branches
- 6.3 plugins/views_data_export_plugin_style_export.inc \views_data_export_plugin_style_export::render()
- 6 plugins/views_data_export_plugin_style_export.inc \views_data_export_plugin_style_export::render()
- 6.2 plugins/views_data_export_plugin_style_export.inc \views_data_export_plugin_style_export::render()
- 7 plugins/views_data_export_plugin_style_export.inc \views_data_export_plugin_style_export::render()
- 7.3 plugins/views_data_export_plugin_style_export.inc \views_data_export_plugin_style_export::render()
Render the display in this style.
Overrides views_plugin_style::render
File
- plugins/
views_data_export_plugin_style_export.inc, line 245 - Plugin include file for export style plugin.
Class
- views_data_export_plugin_style_export
- Generalized style plugin for export plugins.
Code
function render() {
// Get our exporter ready.
if (!isset($this->exporter)) {
$this
->get_exporter();
}
if ($this
->uses_row_plugin() && empty($this->row_plugin)) {
vpr('views_plugin_style_default: Missing row plugin');
return;
}
// Open a file stream to write to.
$file = fopen('php://memory', 'w+');
// $output = '';
// $rows['header'] = $this->render_header();
// $rows['body'] = $this->render_body();
// $rows['footer'] = $this->render_footer();
// $title = '';
// $output .= theme($this->theme_functions(), array('view' => $this->view, 'options' => $this->options, 'rows' => $rows, 'title' => $title));
// return $output;
$this
->render_header($file);
$this
->render_body($file);
$this
->render_footer($file);
// Read from file and verify contents.
fseek($file, 0);
$contents = '';
while (!feof($file)) {
$contents .= fread($file, 8192);
}
// Close up the file stream.
fclose($file);
return $contents;
}