function Datetime::getInfo
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Datetime/Element/Datetime.php \Drupal\Core\Datetime\Element\Datetime::getInfo()
- 10 core/lib/Drupal/Core/Datetime/Element/Datetime.php \Drupal\Core\Datetime\Element\Datetime::getInfo()
- 9 core/lib/Drupal/Core/Datetime/Element/Datetime.php \Drupal\Core\Datetime\Element\Datetime::getInfo()
- 8.9.x core/lib/Drupal/Core/Datetime/Element/Datetime.php \Drupal\Core\Datetime\Element\Datetime::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
-
core/
lib/ Drupal/ Core/ Datetime/ Element/ Datetime.php, line 25
Class
- Datetime
- Provides a datetime element.
Namespace
Drupal\Core\Datetime\ElementCode
public function getInfo() {
// Note that since this information is cached, the #date_timezone property
// is not set here, as this needs to vary potentially by-user.
return [
'#input' => TRUE,
'#element_validate' => [
[
static::class,
'validateDatetime',
],
],
'#process' => [
[
static::class,
'processDatetime',
],
[
static::class,
'processAjaxForm',
],
[
static::class,
'processGroup',
],
],
'#pre_render' => [
[
static::class,
'preRenderGroup',
],
],
'#theme' => 'datetime_form',
'#theme_wrappers' => [
'datetime_wrapper',
],
'#date_date_element' => 'date',
'#date_date_callbacks' => [],
'#date_time_element' => 'time',
'#date_time_callbacks' => [],
'#date_year_range' => '1900:2050',
'#date_increment' => 1,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.