function template_preprocess_views_view_grouping
Same name in other branches
- 8.9.x core/modules/views/views.theme.inc \template_preprocess_views_view_grouping()
- 10 core/modules/views/views.theme.inc \template_preprocess_views_view_grouping()
- 11.x core/modules/views/views.theme.inc \template_preprocess_views_view_grouping()
Prepares variables for views single grouping templates.
Default template: views-view-grouping.html.twig.
Parameters
array $variables: 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
-
core/
modules/ views/ views.theme.inc, line 221
Code
function template_preprocess_views_view_grouping(&$variables) {
$variables['content'] = $variables['view']->style_plugin
->renderGroupingSets($variables['rows'], $variables['grouping_level']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.