You are here

public function S3fsCorsFile::getInfo in S3 File System CORS Upload 8

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 ManagedFile::getInfo

File

src/Element/S3fsCorsFile.php, line 29

Class

S3fsCorsFile
Provides an S3fs Cors File Element.

Namespace

Drupal\s3fs_cors\Element

Code

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