function Url::getInfo

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

Overrides ElementInterface::getInfo

File

core/lib/Drupal/Core/Render/Element/Url.php, line 37

Class

Url
Provides a form element for input of a URL.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
    $class = static::class;
    return [
        '#input' => TRUE,
        '#size' => 60,
        '#maxlength' => 255,
        '#autocomplete_route_name' => FALSE,
        '#process' => [
            [
                $class,
                'processAutocomplete',
            ],
            [
                $class,
                'processAjaxForm',
            ],
            [
                $class,
                'processPattern',
            ],
        ],
        '#element_validate' => [
            [
                $class,
                'validateUrl',
            ],
        ],
        '#pre_render' => [
            [
                $class,
                'preRenderUrl',
            ],
        ],
        '#theme' => 'input__url',
        '#theme_wrappers' => [
            'form_element',
        ],
    ];
}

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