public static function FileUploadForm::preRenderUploadElement in Media Directories 8
Same name and namespace in other branches
- 2.x modules/media_directories_ui/src/Form/FileUploadForm.php \Drupal\media_directories_ui\Form\FileUploadForm::preRenderUploadElement()
Render API callback: Hides display of the proceed control.
See also
\Drupal\file\Element\ManagedFile::preRenderManagedFile()
File
- modules/
media_directories_ui/ src/ Form/ FileUploadForm.php, line 196
Class
- FileUploadForm
- A form to upload files.
Namespace
Drupal\media_directories_ui\FormCode
public static function preRenderUploadElement($element) {
if (isset($element['proceed_button'])) {
// Make sure to be hidden, when the the remove button is hidden.
if (isset($element['remove_button']['#access'])) {
$element['proceed_button']['#access'] = $element['remove_button']['#access'];
}
}
return $element;
}