function template_preprocess_views_view_grouping

Prepares variables for views single grouping templates.

Default template: views-view-grouping.html.twig.

Parameters

array $vars: An associative array containing:

  • view: The view object.
  • rows: The rows returned from the view.
  • grouping_level: Integer indicating the hierarchical level of the grouping.
  • content: The content to be grouped.
  • title: The group heading.

File

drupal/core/modules/views/views.theme.inc, line 368
Preprocessors and helper functions to make theming easier.

Code

function template_preprocess_views_view_grouping(&$vars) {
  $vars['content'] = $vars['view']->style_plugin
    ->renderGroupingSets($vars['rows'], $vars['grouping_level']);
}