function Datelist::getInfo

Same name in other branches
  1. 9 core/lib/Drupal/Core/Datetime/Element/Datelist.php \Drupal\Core\Datetime\Element\Datelist::getInfo()
  2. 10 core/lib/Drupal/Core/Datetime/Element/Datelist.php \Drupal\Core\Datetime\Element\Datelist::getInfo()
  3. 11.x core/lib/Drupal/Core/Datetime/Element/Datelist.php \Drupal\Core\Datetime\Element\Datelist::getInfo()

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 = get_class($this);
    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(),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.