You are here

function views_aggregator_first in Views Aggregator Plus 8

Same name and namespace in other branches
  1. 7 views_aggregator_functions.inc \views_aggregator_first()

Aggregates a field group as the first member of the group.

Parameters

array $groups: An array of groups of rows, each group indexed by group value.

object $field_handler: The handler for the view column to find the first group member in.

Return value

array An empty array.

2 string references to 'views_aggregator_first'
Table::buildOptionsForm in src/Plugin/views/style/Table.php
Render the given style.
views.view.va_test_style_table.yml in tests/modules/views_aggregator_test_config/test_views/views.view.va_test_style_table.yml
tests/modules/views_aggregator_test_config/test_views/views.view.va_test_style_table.yml

File

./views_aggregator_functions.inc, line 408
views_aggregator_functions.inc

Code

function views_aggregator_first(array $groups, $field_handler) {

  // This is the default operation, so nothing to do, except for Webforms.
  $values = [];
  foreach ($groups as $group => $rows) {
    $values[$group] = views_aggregator_get_cell($field_handler, key($rows));
  }
  return $values;
}