public function FileUploadForm::uploadButtonSubmit in Media Directories 3.x
Same name and namespace in other branches
- 8 modules/media_directories_ui/src/Form/FileUploadForm.php \Drupal\media_directories_ui\Form\FileUploadForm::uploadButtonSubmit()
- 2.x modules/media_directories_ui/src/Form/FileUploadForm.php \Drupal\media_directories_ui\Form\FileUploadForm::uploadButtonSubmit()
Submit handler for the upload button, inside the managed_file element.
Parameters
array $form: The form render array.
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
File
- modules/
media_directories_ui/ src/ Form/ FileUploadForm.php, line 112
Class
Namespace
Drupal\media_directories_ui\FormCode
public function uploadButtonSubmit(array $form, FormStateInterface $form_state) {
$files = $this->entityTypeManager
->getStorage('file')
->loadMultiple($form_state
->getValue('upload', []));
$this
->processInputValues($files, $form, $form_state);
}