You are here

function views_plugin_style_xml_test::render in Views Datasource 7

Same name and namespace in other branches
  1. 6 views_plugin_style_xml_test.inc \views_plugin_style_xml_test::render()

Render the display in this style.

Overrides views_plugin_style::render

File

views/plugins/views_plugin_style_xml_test.inc, line 88
Implementation of views_plugin_style for views_xml

Class

views_plugin_style_xml_test
Implements views_plugin_style

Code

function render() {
  $view =& $this->view;
  $options = $this->options;
  $field = $view->field;

  //views_xml_test_debug_stop($view->result);

  //views_xml_test_debug_stop($field["body"]->options["label"]);

  //view_xml_test_debug($field["body"]-)

  /*
  if (empty($this->row_plugin)) {
    vpr('views_plugin_style_xml_test: Views XML: The row plugin for this style must be the XML element plugin.');
    drupal_set_message('<b style="color:red">Views XML: The row plugin for this style must be the XML element plugin.</b>');
    return;
  }

  if (get_class($this->row_plugin) !== 'views_plugin_row_xml_test') {
    vpr('views_plugin_style_xml_test: The row plugin for this style must be the XML element plugin.');
    drupal_set_message('<b style="color:red">Views XML: The row plugin for this style must be the XML element plugin.</b>');
    return;
  }
  */
  $rows = array();
  foreach ($view->result as $row) {

    //views_xml_test_debug_stop($row);
    $rows[] = _views_xml_test_render_fields($view, $row);
  }

  //views_xml_test_debug_stop($rows);
  return theme($this
    ->theme_functions(), array(
    'view' => $this->view,
    'options' => $this->options,
    'rows' => $rows,
  ));
}