You are here

public function Feed::submitOptionsForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/display/Feed.php \Drupal\views\Plugin\views\display\Feed::submitOptionsForm()
  2. 9 core/modules/views/src/Plugin/views/display/Feed.php \Drupal\views\Plugin\views\display\Feed::submitOptionsForm()

Performs any necessary changes to the form values prior to storage.

There is no need for this function to actually store the data.

Overrides PathPluginBase::submitOptionsForm

File

core/modules/views/src/Plugin/views/display/Feed.php, line 311

Class

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

Namespace

Drupal\views\Plugin\views\display

Code

public function submitOptionsForm(&$form, FormStateInterface $form_state) {
  parent::submitOptionsForm($form, $form_state);
  $section = $form_state
    ->get('section');
  switch ($section) {
    case 'title':
      $this
        ->setOption('sitename_title', $form_state
        ->getValue('sitename_title'));
      break;
    case 'displays':
      $this
        ->setOption($section, $form_state
        ->getValue($section));
      break;
  }
}