function ImageButton::getInfo

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

Overrides Submit::getInfo

File

core/lib/Drupal/Core/Render/Element/ImageButton.php, line 18

Class

ImageButton
Provides a form element for a submit button with an image.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
    $info = parent::getInfo();
    unset($info['name']);
    return [
        '#return_value' => TRUE,
        '#has_garbage_value' => TRUE,
        '#src' => NULL,
        '#theme_wrappers' => [
            'input__image_button',
        ],
    ] + $info;
}

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