function template_preprocess_yamlform_actions in YAML Form 8
Prepares variables for form actions templates.
Default template: yamlform-actions.html.twig.
Parameters
array $variables: An associative array containing:
- element: An associative array containing the properties and buttons.
See also
\Drupal\yamlform\YamlFormSubmissionForm::actionsElement
\Drupal\yamlform\YamlFormSubmissionForm::actions
File
- includes/
yamlform.theme.inc, line 112 - Preprocessors and helper functions to make theming easier.
Code
function template_preprocess_yamlform_actions(array &$variables) {
$element = $variables['element'];
// Buttons include submit, previous, next, and draft.
foreach (Element::children($element) as $key) {
$variables[$key] = $element[$key];
}
}