function template_preprocess_yamlform_composite_address in YAML Form 8
Prepares variables for address composite element templates.
Default template: yamlform-element-address.html.twig.
Parameters
array $variables: An associative array containing:
- element: An associative array containing the properties of the element. Properties used: #title, #value, #options, #description, #required, #attributes.
File
- includes/
yamlform.theme.inc, line 618 - Preprocessors and helper functions to make theming easier.
Code
function template_preprocess_yamlform_composite_address(array &$variables) {
$element = $variables['element'];
foreach (Element::children($element) as $key) {
if ($element[$key]['#access']) {
$variables['content'][$key] = $element[$key];
}
}
$variables['flexbox'] = isset($element['#flexbox']) ? $element['#flexbox'] : FALSE;
}