You are here

public function Upload::getInfo in Lightning Media 8.4

Same name and namespace in other branches
  1. 8 src/Element/Upload.php \Drupal\lightning_media\Element\Upload::getInfo()
  2. 8.2 src/Element/Upload.php \Drupal\lightning_media\Element\Upload::getInfo()
  3. 8.3 src/Element/Upload.php \Drupal\lightning_media\Element\Upload::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 File::getInfo

File

src/Element/Upload.php, line 20

Class

Upload
A form element to handle file uploads.

Namespace

Drupal\lightning_media\Element

Code

public function getInfo() {
  $info = parent::getInfo();
  $info['#required'] = FALSE;
  $info['#upload_location'] = 'public://';
  $info['#upload_validators'] = [];
  $info['#element_validate'] = [
    [
      static::class,
      'validate',
    ],
  ];
  return $info;
}