function template_preprocess_field_group_accordion in Field Group 8
Same name and namespace in other branches
- 8.3 templates/theme.inc \template_preprocess_field_group_accordion()
Prepares variables for fieldgroup accordion templates.
Default template: field-group-accordion.html.twig.
Parameters
array $variables: An associative array containing:
- element: An associative array containing the properties and children of the accordion element. Properties used: #children.
File
- templates/
theme.inc, line 35 - Preprocessors for fieldgroup elements.
Code
function template_preprocess_field_group_accordion(&$variables) {
$element = $variables['element'];
$variables['children'] = !empty($element['#children']) ? $element['#children'] : '';
}