public function Page::submitOptionsForm

Overrides \Drupal\views\Plugin\views\display\callbackPluginBase::submitOptionsForm().

Overrides PathPluginBase::submitOptionsForm

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/Page.php, line 395
Contains Drupal\views\Plugin\views\display\Page.

Class

Page
The plugin that handles a full page.

Namespace

Drupal\views\Plugin\views\display

Code

public function submitOptionsForm(&$form, &$form_state) {
  parent::submitOptionsForm($form, $form_state);
  switch ($form_state['section']) {
    case 'menu':
      $this
        ->setOption('menu', $form_state['values']['menu']);

      // send ajax form to options page if we use it.
      if ($form_state['values']['menu']['type'] == 'default tab') {
        $form_state['view']
          ->addFormToStack('display', $this->display['id'], array(
          'tab_options',
        ));
      }
      break;
    case 'tab_options':
      $this
        ->setOption('tab_options', $form_state['values']['tab_options']);
      break;
  }
}