function template_preprocess_yamlform_composite_creditcard in YAML Form 8
Prepares variables for creditcard composite element templates.
Default template: yamlform-element-creditcard.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 660  - Preprocessors and helper functions to make theming easier.
 
Code
function template_preprocess_yamlform_composite_creditcard(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;
}