You are here

public function SamlSpConfigSPForm::submitForm in SAML Service Provider 7.8

File

src/Form/SamlSpConfigSPForm.php, line 25
Contains \Drupal\saml_sp\Form\SamlSpConfigSPForm.

Class

SamlSpConfigSPForm

Namespace

Drupal\saml_sp\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('saml_sp.settings');
  $values = $form_state
    ->getValues();
  $this
    ->configRecurse($config, $values['contact'], 'contact');
  $this
    ->configRecurse($config, $values['organization'], 'organization');
  $this
    ->configRecurse($config, $values['security'], 'security');
  $config
    ->set('strict', $values['strict']);
  $config
    ->set('key_location', $values['key_location']);
  $config
    ->set('cert_location', $values['cert_location']);
  $config
    ->save();
  if (method_exists($this, '_submitForm')) {
    $this
      ->_submitForm($form, $form_state);
  }
  parent::submitForm($form, $form_state);
}