You are here

public function DropDown::submit in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/EntityBrowser/WidgetSelector/DropDown.php \Drupal\entity_browser\Plugin\EntityBrowser\WidgetSelector\DropDown::submit()

Submits form.

Parameters

array $form: Form.

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

Return value

string The selected widget ID.

Overrides WidgetSelectorBase::submit

File

src/Plugin/EntityBrowser/WidgetSelector/DropDown.php, line 64

Class

DropDown
Displays widgets in a select list.

Namespace

Drupal\entity_browser\Plugin\EntityBrowser\WidgetSelector

Code

public function submit(array &$form, FormStateInterface $form_state) {
  return $form_state
    ->getValue('widget');
}