You are here

public function Number::getInfo in Physical Fields 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/Number.php, line 34

Class

Number
Provides a number form element with support for language-specific input.

Namespace

Drupal\physical\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#min' => 0,
    '#max' => NULL,
    '#size' => 10,
    '#maxlength' => 128,
    '#default_value' => NULL,
    '#element_validate' => [
      [
        $class,
        'validateNumber',
      ],
    ],
    '#process' => [
      [
        $class,
        'processElement',
      ],
      [
        $class,
        'processAjaxForm',
      ],
      [
        $class,
        'processGroup',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderNumber',
      ],
      [
        $class,
        'preRenderGroup',
      ],
    ],
    '#input' => TRUE,
    '#theme' => 'input__textfield',
    '#theme_wrappers' => [
      'form_element',
    ],
  ];
}