public function DurationElement::getInfo in Duration Field 3.0.x
Same name and namespace in other branches
- 8.2 src/Element/DurationElement.php \Drupal\duration_field\Element\DurationElement::getInfo()
Returns the element properties for this element.
Return value
array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.
Overrides ElementInterface::getInfo
File
- src/
Element/ DurationElement.php, line 48
Class
- DurationElement
- Defines the 'duration' form element.
Namespace
Drupal\duration_field\ElementCode
public function getInfo() {
$class = get_class($this);
return [
'#input' => TRUE,
'#tree' => TRUE,
'#date_increment' => '1',
'#granularity' => 'y:m:d:h:i:s',
'#required_elements' => '',
'#element_validate' => [
[
$class,
'validateElement',
],
],
'#pre_render' => [
[
$class,
'preRenderElement',
],
],
'#process' => [
'Drupal\\Core\\Render\\Element\\RenderElement::processAjaxForm',
[
$class,
'processElement',
],
],
'#theme_wrappers' => [
'form_element',
],
];
}