protected function BynderUpload::clearFormValues in Bynder 8.3
Same name and namespace in other branches
- 8 src/Plugin/EntityBrowser/Widget/BynderUpload.php \Drupal\bynder\Plugin\EntityBrowser\Widget\BynderUpload::clearFormValues()
- 8.2 src/Plugin/EntityBrowser/Widget/BynderUpload.php \Drupal\bynder\Plugin\EntityBrowser\Widget\BynderUpload::clearFormValues()
- 4.0.x src/Plugin/EntityBrowser/Widget/BynderUpload.php \Drupal\bynder\Plugin\EntityBrowser\Widget\BynderUpload::clearFormValues()
Clear values from upload form element.
Parameters
array $element: Upload form element.
\Drupal\Core\Form\FormStateInterface $form_state: Form state object.
1 call to BynderUpload::clearFormValues()
- BynderUpload::submit in src/
Plugin/ EntityBrowser/ Widget/ BynderUpload.php
File
- src/
Plugin/ EntityBrowser/ Widget/ BynderUpload.php, line 427
Class
- BynderUpload
- Uses upload to create media entities.
Namespace
Drupal\bynder\Plugin\EntityBrowser\WidgetCode
protected function clearFormValues(array &$element, FormStateInterface $form_state) {
$form_state
->setValueForElement($element['upload']['uploaded_files'], '');
NestedArray::setValue($form_state
->getUserInput(), $element['upload']['uploaded_files']['#parents'], '');
$form_state
->set('uploaded_entities', NULL);
}