public function ConfigItemGroup::submitForm

Overrides \Drupal\views_ui\Form\Ajax\ViewsFormBase::submitForm().

Overrides ViewsFormBase::submitForm

File

drupal/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemGroup.php, line 97
Contains \Drupal\views_ui\Form\Ajax\ConfigItemGroup.

Class

ConfigItemGroup
Provides a form for configuring grouping information for a Views UI item.

Namespace

Drupal\views_ui\Form\Ajax

Code

public function submitForm(array &$form, array &$form_state) {
  $item =& $form_state['handler']->options;
  $type = $form_state['type'];
  $id = $form_state['id'];
  $handler = views_get_handler($item, $type);
  $executable = $form_state['view']
    ->get('executable');
  $handler
    ->init($executable, $executable->display_handler, $item);
  $handler
    ->submitGroupByForm($form, $form_state);

  // Store the item back on the view
  $executable
    ->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);

  // Write to cache
  $form_state['view']
    ->cacheSet();
}