You are here

public function Acquiadam::submit in Media: Acquia DAM 8

File

src/Plugin/EntityBrowser/Widget/Acquiadam.php, line 762

Class

Acquiadam
Uses a view to provide entity listing in a browser's widget.

Namespace

Drupal\media_acquiadam\Plugin\EntityBrowser\Widget

Code

public function submit(array &$element, array &$form, FormStateInterface $form_state) {
  $assets = [];
  if (!empty($form_state
    ->getTriggeringElement()['#eb_widget_main_submit'])) {
    $assets = $this
      ->prepareEntities($form, $form_state);
  }
  $this
    ->selectEntities($assets, $form_state);
}