You are here

public function ManagedFile::getInfo in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/file/src/Element/ManagedFile.php \Drupal\file\Element\ManagedFile::getInfo()

Returns the element properties for this element.

Return value

array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.

Overrides ElementInterface::getInfo

File

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

Class

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

Namespace

Drupal\file\Element

Code

public function getInfo() {
  $class = get_class($this);
  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',
      ],
    ],
  ];
}