You are here

public function NoDisplay::submit in Entity Browser 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/EntityBrowser/SelectionDisplay/NoDisplay.php \Drupal\entity_browser\Plugin\EntityBrowser\SelectionDisplay\NoDisplay::submit()

Submits form.

Parameters

array $form: Form.

\Drupal\Core\Form\FormStateInterface $form_state: Form state object.

Overrides SelectionDisplayBase::submit

File

src/Plugin/EntityBrowser/SelectionDisplay/NoDisplay.php, line 31

Class

NoDisplay
Does not show current selection and immediately delivers selected entities.

Namespace

Drupal\entity_browser\Plugin\EntityBrowser\SelectionDisplay

Code

public function submit(array &$form, FormStateInterface $form_state) {

  // Only finish selection if the form was submitted using main submit
  // element. This allows widgets to build multi-step workflows.
  if (!empty($form_state
    ->getTriggeringElement()['#eb_widget_main_submit'])) {
    $this
      ->selectionDone($form_state);
  }
}