template_preprocess_datetime_form(&$variables)
Prepares variables for datetime form element templates.
The datetime form element serves as a wrapper around the date element type, which creates a date and a time component for a date.
Default template: datetime-form.html.twig.
array $variables: An associative array containing:
form_process_datetime()
function template_preprocess_datetime_form(&$variables) { $element = $variables['element']; $variables['attributes'] = array(); if (isset($element['#id'])) { $variables['attributes']['id'] = $element['#id']; } if (!empty($element['#attributes']['class'])) { $variables['attributes']['class'] = (array) $element['#attributes']['class']; } $variables['content'] = $element; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!theme.inc/function/template_preprocess_datetime_form/8.1.x