public function Upload::getInfo in Lightning Media 8.3
Same name and namespace in other branches
- 8.4 src/Element/Upload.php \Drupal\lightning_media\Element\Upload::getInfo()
- 8 src/Element/Upload.php \Drupal\lightning_media\Element\Upload::getInfo()
- 8.2 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\ElementCode
public function getInfo() {
$info = parent::getInfo();
$info['#required'] = FALSE;
$info['#upload_location'] = 'public://';
$info['#upload_validators'] = [];
$info['#element_validate'] = [
[
static::class,
'validate',
],
];
return $info;
}