function template_preprocess_bat_type_group in Booking and Availability Management Tools for Drupal 8
Prepares variables for Type Group templates.
Default template: bat-type-group.html.twig.
Parameters
array $variables: An associative array containing:
- elements: An associative array containing the user information and any
- attributes: HTML attributes for the containing element.
File
- ./
bat.module, line 472 - Contains bat.module..
Code
function template_preprocess_bat_type_group(array &$variables) {
// Fetch Type Group Entity Object.
$type_group = $variables['elements']['#bat_type_group'];
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}