You are here

public function HMS::getInfo in HMS Field 8

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/HMS.php, line 24
Contains \Drupal\hms_field\Element\Hmsfield.

Class

HMS
Provides a one-line text field form element.

Namespace

Drupal\hms_field\Element

Code

public function getInfo() {
  $class = get_class($this);
  return array(
    '#input' => TRUE,
    '#size' => 8,
    '#maxlength' => 16,
    '#default_value' => FALSE,
    '#format' => 'h:mm:ss',
    '#placeholder' => 'h:mm:ss',
    '#autocomplete_route_name' => FALSE,
    '#process' => array(
      array(
        $class,
        'processAutocomplete',
      ),
      array(
        $class,
        'processAjaxForm',
      ),
      array(
        $class,
        'processPattern',
      ),
      array(
        $class,
        'processGroup',
      ),
    ),
    '#pre_render' => array(
      array(
        $class,
        'preRenderHMS',
      ),
    ),
    '#element_validate' => array(
      array(
        $class,
        'validateHMS',
      ),
    ),
    '#theme' => 'input__textfield',
    '#theme_wrappers' => array(
      'form_element',
    ),
  );
}