You are here

protected function DropzoneJsEbWidget::selectEntities in DropzoneJS 8

Same name and namespace in other branches
  1. 8.2 modules/eb_widget/src/Plugin/EntityBrowser/Widget/DropzoneJsEbWidget.php \Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget\DropzoneJsEbWidget::selectEntities()
3 calls to DropzoneJsEbWidget::selectEntities()
DropzoneJsEbWidget::submit in modules/eb_widget/src/Plugin/EntityBrowser/Widget/DropzoneJsEbWidget.php
InlineEntityFormMediaWidget::submit in modules/eb_widget/src/Plugin/EntityBrowser/Widget/InlineEntityFormMediaWidget.php
MediaEntityDropzoneJsEbWidget::submit in modules/eb_widget/src/Plugin/EntityBrowser/Widget/MediaEntityDropzoneJsEbWidget.php

File

modules/eb_widget/src/Plugin/EntityBrowser/Widget/DropzoneJsEbWidget.php, line 291

Class

DropzoneJsEbWidget
Provides an Entity Browser widget that uploads new files.

Namespace

Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget

Code

protected function selectEntities(array $entities, FormStateInterface $form_state) {
  if (!empty(array_filter($entities))) {
    $config = $this
      ->getConfiguration();
    if (empty($config['settings']['auto_select'])) {
      parent::selectEntities($entities, $form_state);
    }
  }
  $form_state
    ->set([
    'dropzonejs',
    'added_entities',
  ], $entities);
}