function Weight::getInfo

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

Overrides ElementInterface::getInfo

File

core/lib/Drupal/Core/Render/Element/Weight.php, line 34

Class

Weight
Provides a form element for input of a weight.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
    $class = get_class($this);
    return [
        '#input' => TRUE,
        '#delta' => 10,
        '#default_value' => 0,
        '#process' => [
            [
                $class,
                'processWeight',
            ],
            [
                $class,
                'processAjaxForm',
            ],
        ],
    ];
}

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