You are here

protected function ComplexGrouping::complexGroupingSettings in Views Complex Grouping 8

Helper function to retrieve settings for grouping limit.

Parameters

int $index: The grouping level to fetch settings for.

Return value

array Settings for this grouping level.

1 call to ComplexGrouping::complexGroupingSettings()
ComplexGrouping::complexGroupingRecursiveLimit in src/Plugin/views/style/ComplexGrouping.php
Recursively limits the number of rows in nested groups.

File

src/Plugin/views/style/ComplexGrouping.php, line 317

Class

ComplexGrouping
Class ComplexGrouping.

Namespace

Drupal\views_complex_grouping\Plugin\views\style

Code

protected function complexGroupingSettings($index) {
  if ($this->options['grouping'][$index] && $this->options['grouping'][$index]['complex_grouping']) {
    return $this->options['grouping'][$index]['complex_grouping'];
  }
  else {
    return [
      'grouping_limit' => 0,
      'grouping_offset' => 0,
    ];
  }
}