public static function SingleDateTime::preRenderSingleDateTime in Single DateTimePicker 8
Render element for input.html.twig.
Parameters
array $element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #size, #maxlength, #placeholder, #required, #attributes.
Return value
array The $element with prepared variables ready for input.html.twig.
File
- src/
Element/ SingleDateTime.php, line 47
Class
- SingleDateTime
- Provides a SingleDateTime form element.
Namespace
Drupal\single_datetime\ElementCode
public static function preRenderSingleDateTime(array $element) {
$element['#attributes']['type'] = 'text';
Element::setAttributes($element, [
'id',
'name',
'value',
'size',
]);
static::setAttributes($element, [
'form-date',
]);
return $element;
}