public static function DurationElement::preRenderElement in Duration Field 3.0.x
Same name and namespace in other branches
- 8.2 src/Element/DurationElement.php \Drupal\duration_field\Element\DurationElement::preRenderElement()
File
- src/
Element/ DurationElement.php, line 205
Class
- DurationElement
- Defines the 'duration' form element.
Namespace
Drupal\duration_field\ElementCode
public static function preRenderElement(array $element) {
// Set the wrapper as a container to the inner values.
$element['#attributes']['type'] = 'container';
Element::setAttributes($element, [
'id',
'name',
'value',
]);
static::setAttributes($element, [
'form-duration',
]);
return $element;
}