function ConfigHandlerGroup::submitForm

Same name in other branches
  1. 9 core/modules/views_ui/src/Form/Ajax/ConfigHandlerGroup.php \Drupal\views_ui\Form\Ajax\ConfigHandlerGroup::submitForm()
  2. 10 core/modules/views_ui/src/Form/Ajax/ConfigHandlerGroup.php \Drupal\views_ui\Form\Ajax\ConfigHandlerGroup::submitForm()
  3. 11.x core/modules/views_ui/src/Form/Ajax/ConfigHandlerGroup.php \Drupal\views_ui\Form\Ajax\ConfigHandlerGroup::submitForm()

Overrides ViewsFormBase::submitForm

File

core/modules/views_ui/src/Form/Ajax/ConfigHandlerGroup.php, line 97

Class

ConfigHandlerGroup
Provides a form for configuring grouping information for a Views UI handler.

Namespace

Drupal\views_ui\Form\Ajax

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
    $view = $form_state->get('view');
    $item =& $form_state->get('handler')->options;
    $type = $form_state->get('type');
    $handler = Views::handlerManager($type)->getHandler($item);
    $executable = $view->getExecutable();
    $handler->init($executable, $executable->display_handler, $item);
    $handler->submitGroupByForm($form, $form_state);
    // Store the item back on the view
    $executable->setHandler($form_state->get('display_id'), $form_state->get('type'), $form_state->get('id'), $item);
    // Write to cache
    $view->cacheSet();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.