You are here

public static function EntityBrowserEditForm::submitUpdateWidgetSelector in Entity Browser 8.2

Same name and namespace in other branches
  1. 8 src/Form/EntityBrowserEditForm.php \Drupal\entity_browser\Form\EntityBrowserEditForm::submitUpdateWidgetSelector()

AJAX submit callback for updating widget selector.

File

src/Form/EntityBrowserEditForm.php, line 385

Class

EntityBrowserEditForm
Class EntityBrowserEditForm.

Namespace

Drupal\entity_browser\Form

Code

public static function submitUpdateWidgetSelector($form, FormStateInterface $form_state) {
  $widget_selector = $form_state
    ->getValue('widget_selector');
  $form_state
    ->getFormObject()
    ->getEntity()
    ->setWidgetSelector($widget_selector);
  $form_state
    ->setRebuild();
}