You are here

function views_crosstab_table::render_fields in Views Crosstab 7

Render all of the fields for a given style and store them on the object.

Parameters

$result: The result array from $view->result

Overrides views_plugin_style::render_fields

File

plugins/views_crosstab_table.inc, line 515
Plugin functions

Class

views_crosstab_table
Style plugin to transform a linear query into a crosstab table.

Code

function render_fields($result) {
  $rendered_fields = parent::render_fields($result);
  if ($this->view->style_plugin->options['include_crosstab_operation_on_column']) {

    // Create proper heading in last summary row, first column. This cannot be done earlier
    // because it might be subjected to numeric or other formatting.
    $row_field = $this->view->style_options['crosstab_rows'];
    end($rendered_fields);
    $rendered_fields[key($rendered_fields)][$row_field] = self::crosstab_operation_header($this->view->style_plugin->options['crosstab_operation']);
  }
  return $rendered_fields;
}