function File::getInfo

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

Overrides ElementInterface::getInfo

File

core/lib/Drupal/Core/Render/Element/File.php, line 29

Class

File
Provides a form element for uploading a file.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
    $class = static::class;
    return [
        '#input' => TRUE,
        '#multiple' => FALSE,
        '#process' => [
            [
                $class,
                'processFile',
            ],
        ],
        '#size' => 60,
        '#pre_render' => [
            [
                $class,
                'preRenderFile',
            ],
        ],
        '#theme' => 'input__file',
        '#theme_wrappers' => [
            'form_element',
        ],
        '#value_callback' => [
            [
                $class,
                'valueCallback',
            ],
        ],
    ];
}

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