function ManagedFile::getInfo
Same name in other branches
- 9 core/modules/file/src/Element/ManagedFile.php \Drupal\file\Element\ManagedFile::getInfo()
- 8.9.x core/modules/file/src/Element/ManagedFile.php \Drupal\file\Element\ManagedFile::getInfo()
- 10 core/modules/file/src/Element/ManagedFile.php \Drupal\file\Element\ManagedFile::getInfo()
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,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.