You are here

public function FractionDecimal::getInfo in Fraction 8

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

Class

FractionDecimal
Provides a fraction decimal form element.

Namespace

Drupal\fraction\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#step' => 'any',
    '#size' => 15,
    '#maxlength' => 128,
    '#default_value' => NULL,
    '#element_validate' => [
      [
        $class,
        'validateDecimal',
      ],
    ],
    '#process' => [
      [
        $class,
        'processAjaxForm',
      ],
      [
        $class,
        'processGroup',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderNumber',
      ],
      [
        $class,
        'preRenderGroup',
      ],
    ],
    '#theme' => 'input__textfield',
    '#theme_wrappers' => [
      'form_element',
    ],
  ];
}