You are here

protected function SelectionDisplayBase::selectionDone in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/SelectionDisplayBase.php \Drupal\entity_browser\SelectionDisplayBase::selectionDone()

Marks selection as done - sets value in form state and dispatches event.

3 calls to SelectionDisplayBase::selectionDone()
MultiStepDisplay::submit in src/Plugin/EntityBrowser/SelectionDisplay/MultiStepDisplay.php
Submits form.
NoDisplay::submit in src/Plugin/EntityBrowser/SelectionDisplay/NoDisplay.php
Submits form.
View::submit in src/Plugin/EntityBrowser/SelectionDisplay/View.php
Submits form.

File

src/SelectionDisplayBase.php, line 156

Class

SelectionDisplayBase
Base implementation for selection display plugins.

Namespace

Drupal\entity_browser

Code

protected function selectionDone(FormStateInterface $form_state) {
  $form_state
    ->set([
    'entity_browser',
    'selection_completed',
  ], TRUE);
  $this->eventDispatcher
    ->dispatch(Events::DONE, new SelectionDoneEvent($this->configuration['entity_browser_id'], $form_state
    ->get([
    'entity_browser',
    'instance_uuid',
  ])));
}