You are here

public function Datelist::getInfo in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Datetime/Element/Datelist.php \Drupal\Core\Datetime\Element\Datelist::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/Datelist.php, line 20

Class

Datelist
Provides a datelist element.

Namespace

Drupal\Core\Datetime\Element

Code

public function getInfo() {
  $class = static::class;
  return [
    '#input' => TRUE,
    '#element_validate' => [
      [
        $class,
        'validateDatelist',
      ],
    ],
    '#process' => [
      [
        $class,
        'processDatelist',
      ],
    ],
    '#theme' => 'datetime_form',
    '#theme_wrappers' => [
      'datetime_wrapper',
    ],
    '#date_part_order' => [
      'year',
      'month',
      'day',
      'hour',
      'minute',
    ],
    '#date_year_range' => '1900:2050',
    '#date_increment' => 1,
    '#date_date_callbacks' => [],
    '#date_timezone' => date_default_timezone_get(),
  ];
}