You are here

public function MultipleSubmitTestWidget::submit in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 tests/modules/entity_browser_test/src/Plugin/EntityBrowser/Widget/MultipleSubmitTestWidget.php \Drupal\entity_browser_test\Plugin\EntityBrowser\Widget\MultipleSubmitTestWidget::submit()

Submits form.

Parameters

array $element: Widget part of the form.

array $form: Form.

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

Overrides WidgetBase::submit

File

tests/modules/entity_browser_test/src/Plugin/EntityBrowser/Widget/MultipleSubmitTestWidget.php, line 50

Class

MultipleSubmitTestWidget
Test widget with multiple submit buttons for test purposes.

Namespace

Drupal\entity_browser_test\Plugin\EntityBrowser\Widget

Code

public function submit(array &$element, array &$form, FormStateInterface $form_state) {
  if ($this->entity) {
    $this
      ->selectEntities([
      $this->entity,
    ], $form_state);
  }
}