protected function InlineEntityFormMediaWidget::clearFormValues in DropzoneJS 8
Same name and namespace in other branches
- 8.2 modules/eb_widget/src/Plugin/EntityBrowser/Widget/InlineEntityFormMediaWidget.php \Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget\InlineEntityFormMediaWidget::clearFormValues()
Clear values from upload form element.
Parameters
array $element: Upload form element.
\Drupal\Core\Form\FormStateInterface $form_state: Form state object.
Overrides DropzoneJsEbWidget::clearFormValues
1 call to InlineEntityFormMediaWidget::clearFormValues()
- InlineEntityFormMediaWidget::submit in modules/
eb_widget/ src/ Plugin/ EntityBrowser/ Widget/ InlineEntityFormMediaWidget.php
File
- modules/
eb_widget/ src/ Plugin/ EntityBrowser/ Widget/ InlineEntityFormMediaWidget.php, line 254
Class
- InlineEntityFormMediaWidget
- Provides an Entity Browser widget that uploads and edit new files.
Namespace
Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\WidgetCode
protected function clearFormValues(array &$element, FormStateInterface $form_state) {
parent::clearFormValues($element, $form_state);
// Clear uploaded_entities to get a clean form in multi-step selection.
$form_state
->set('uploaded_entities', []);
}