public function ManagedFile::getInfo in Drupal 10
Same name and namespace in other branches
- 8 core/modules/file/src/Element/ManagedFile.php \Drupal\file\Element\ManagedFile::getInfo()
- 9 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
Class
- ManagedFile
- Provides an AJAX/progress aware widget for uploading and saving a file.
Namespace
Drupal\file\ElementCode
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,
];
}