You are here

public function DisplayTest::submitOptionsForm in Drupal 9

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

Handle any special handling on the validate form.

Overrides DisplayPluginBase::submitOptionsForm

File

core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php, line 107

Class

DisplayTest
Defines a Display test plugin.

Namespace

Drupal\views_test_data\Plugin\views\display

Code

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