You are here

public function Feed::submitOptionsForm in Views (for Drupal 7) 8.3

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

Overrides Page::submitOptionsForm

File

lib/Drupal/views/Plugin/views/display/Feed.php, line 219
Definition of Drupal\views\Plugin\views\display\Feed.

Class

Feed
The plugin that handles a feed, such as RSS or atom.

Namespace

Drupal\views\Plugin\views\display

Code

public function submitOptionsForm(&$form, &$form_state) {

  // It is very important to call the parent function here:
  parent::submitOptionsForm($form, $form_state);
  switch ($form_state['section']) {
    case 'title':
      $this
        ->setOption('sitename_title', $form_state['values']['sitename_title']);
      break;
    case 'displays':
      $this
        ->setOption($form_state['section'], $form_state['values'][$form_state['section']]);
      break;
  }
}