You are here

protected function EntityBrowserForm::setCurrentWidget in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Form/EntityBrowserForm.php \Drupal\entity_browser\Form\EntityBrowserForm::setCurrentWidget()

Sets widget that is currently active.

Parameters

string $widget: New active widget UUID.

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

1 call to EntityBrowserForm::setCurrentWidget()
EntityBrowserForm::submitForm in src/Form/EntityBrowserForm.php
Form submission handler.

File

src/Form/EntityBrowserForm.php, line 279

Class

EntityBrowserForm
The entity browser form.

Namespace

Drupal\entity_browser\Form

Code

protected function setCurrentWidget($widget, FormStateInterface $form_state) {
  $form_state
    ->set('entity_browser_current_widget', $widget);
}