function File::processFile
Same name in other branches
- 9 core/lib/Drupal/Core/Render/Element/File.php \Drupal\Core\Render\Element\File::processFile()
- 8.9.x core/lib/Drupal/Core/Render/Element/File.php \Drupal\Core\Render\Element\File::processFile()
- 10 core/lib/Drupal/Core/Render/Element/File.php \Drupal\Core\Render\Element\File::processFile()
Processes a file upload element, make use of #multiple if present.
File
-
core/
lib/ Drupal/ Core/ Render/ Element/ File.php, line 52
Class
- File
- Provides a form element for uploading a file.
Namespace
Drupal\Core\Render\ElementCode
public static function processFile(&$element, FormStateInterface $form_state, &$complete_form) {
if ($element['#multiple']) {
$element['#attributes']['multiple'] = 'multiple';
$element['#name'] .= '[]';
}
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.