function Textfield::getInfo

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

Overrides ElementInterface::getInfo

3 methods override Textfield::getInfo()
EntityAutocomplete::getInfo in core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php
Returns the element properties for this element.
MachineName::getInfo in core/lib/Drupal/Core/Render/Element/MachineName.php
Returns the element properties for this element.
PathElement::getInfo in core/lib/Drupal/Core/Render/Element/PathElement.php
Returns the element properties for this element.

File

core/lib/Drupal/Core/Render/Element/Textfield.php, line 50

Class

Textfield
Provides a one-line text field form element.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
    $class = static::class;
    return [
        '#input' => TRUE,
        '#size' => 60,
        '#maxlength' => 128,
        '#autocomplete_route_name' => FALSE,
        '#process' => [
            [
                $class,
                'processAutocomplete',
            ],
            [
                $class,
                'processAjaxForm',
            ],
            [
                $class,
                'processPattern',
            ],
            [
                $class,
                'processGroup',
            ],
        ],
        '#pre_render' => [
            [
                $class,
                'preRenderTextfield',
            ],
            [
                $class,
                'preRenderGroup',
            ],
        ],
        '#theme' => 'input__textfield',
        '#theme_wrappers' => [
            'form_element',
        ],
    ];
}

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