You are here

protected function views_aggregator_plugin_style_table::compress_grouped_results in Views Aggregator Plus 7

Removes no longer needed View result rows from the set.

Parameters

array $groups: Groups of aggregated rows.

1 call to views_aggregator_plugin_style_table::compress_grouped_results()
views_aggregator_plugin_style_table::pre_render in views/views_aggregator_plugin_style_table.inc
Overrides pre_render().

File

views/views_aggregator_plugin_style_table.inc, line 453
views_aggregator_plugin_style_table.inc

Class

views_aggregator_plugin_style_table
Style plugin to render each item as a row in a table.

Code

protected function compress_grouped_results($groups) {
  foreach ($groups as $rows) {
    $is_first = TRUE;
    foreach ($rows as $num => $row) {

      // The aggregated row is the first of each group. Destroy the others.
      if (!$is_first) {
        unset($this->rendered_fields[$num]);
        unset($this->view->result[$num]);
      }
      $is_first = FALSE;
    }
  }
}