You are here

public function RestExport::submitOptionsForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::submitOptionsForm()
  2. 9 core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::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/rest/src/Plugin/views/display/RestExport.php, line 329

Class

RestExport
The plugin that handles Data response callbacks for REST resources.

Namespace

Drupal\rest\Plugin\views\display

Code

public function submitOptionsForm(&$form, FormStateInterface $form_state) {
  parent::submitOptionsForm($form, $form_state);
  if ($form_state
    ->get('section') == 'auth') {
    $this
      ->setOption('auth', array_keys(array_filter($form_state
      ->getValue('auth'))));
  }
}