You are here

public function TimeElement::getInfo in Time Field For Drupal 8.x / 9.x 8

Same name and namespace in other branches
  1. 2.x src/Element/TimeElement.php \Drupal\time_field\Element\TimeElement::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/TimeElement.php, line 30

Class

TimeElement
Provides a time field form element.

Namespace

Drupal\time_field\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#show_seconds' => false,
    '#input' => TRUE,
    '#process' => [
      [
        $class,
        'processAjaxForm',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderTime',
      ],
    ],
    '#theme' => 'input__time',
    '#theme_wrappers' => [
      'form_element',
    ],
  ];
}