function ManagedFile::getInfo

Same name in other branches
  1. 8.9.x core/modules/file/src/Element/ManagedFile.php \Drupal\file\Element\ManagedFile::getInfo()
  2. 10 core/modules/file/src/Element/ManagedFile.php \Drupal\file\Element\ManagedFile::getInfo()
  3. 11.x core/modules/file/src/Element/ManagedFile.php \Drupal\file\Element\ManagedFile::getInfo()

Overrides ElementInterface::getInfo

File

core/modules/file/src/Element/ManagedFile.php, line 30

Class

ManagedFile
Provides an AJAX/progress aware widget for uploading and saving a file.

Namespace

Drupal\file\Element

Code

public function getInfo() {
    $class = static::class;
    return [
        '#input' => TRUE,
        '#process' => [
            [
                $class,
                'processManagedFile',
            ],
        ],
        '#element_validate' => [
            [
                $class,
                'validateManagedFile',
            ],
        ],
        '#pre_render' => [
            [
                $class,
                'preRenderManagedFile',
            ],
        ],
        '#theme' => 'file_managed_file',
        '#theme_wrappers' => [
            'form_element',
        ],
        '#progress_indicator' => 'throbber',
        '#progress_message' => NULL,
        '#upload_validators' => [],
        '#upload_location' => NULL,
        '#size' => 22,
        '#multiple' => FALSE,
        '#extended' => FALSE,
        '#attached' => [
            'library' => [
                'file/drupal.file',
            ],
        ],
        '#accept' => NULL,
    ];
}

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