1 views_plugin_display_page.inc views_plugin_display_page::options_submit(&$form, &$form_state)

Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data.

Overrides views_plugin_display::options_submit

File

core/modules/views/plugins/views_plugin_display_page.inc, line 603
Contains the page display plugin.

Class

views_plugin_display_page
The plugin that handles a full page.

Code

function options_submit(&$form, &$form_state) {
  // It is very important to call the parent function here:
  parent::options_submit($form, $form_state);
  switch ($form_state['section']) {
    case 'path':
      $this->set_option('path', $form_state['values']['path']);
      break;
    case 'menu':
      $this->set_option('menu', $form_state['values']['menu']);
      // send ajax form to options page if we use it.
      if ($form_state['values']['menu']['type'] == 'default tab') {
        views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('tab_options'));
      }
      break;
    case 'tab_options':
      $this->set_option('tab_options', $form_state['values']['tab_options']);
      break;
  }
}