You are here

function template_preprocess_field_group_accordion in Field Group 8.3

Same name and namespace in other branches
  1. 8 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(array &$variables) {
  $element = $variables['element'];
  $variables['children'] = !empty($element['#children']) ? $element['#children'] : '';
}