You are here

public function SamlSpDrupalLoginConfig::submitForm in SAML Service Provider 8.3

Same name and namespace in other branches
  1. 8.2 modules/saml_sp_drupal_login/src/Form/SamlSpDrupalLoginConfig.php \Drupal\saml_sp_drupal_login\Form\SamlSpDrupalLoginConfig::submitForm()
  2. 4.x modules/saml_sp_drupal_login/src/Form/SamlSpDrupalLoginConfig.php \Drupal\saml_sp_drupal_login\Form\SamlSpDrupalLoginConfig::submitForm()
  3. 3.x modules/saml_sp_drupal_login/src/Form/SamlSpDrupalLoginConfig.php \Drupal\saml_sp_drupal_login\Form\SamlSpDrupalLoginConfig::submitForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides ConfigFormBase::submitForm

File

modules/saml_sp_drupal_login/src/Form/SamlSpDrupalLoginConfig.php, line 148

Class

SamlSpDrupalLoginConfig
Provides the configuration form.

Namespace

Drupal\saml_sp_drupal_login\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('saml_sp_drupal_login.config');
  $values = $form_state
    ->getValues();
  foreach ($values['config'] as $key => $value) {
    $config
      ->set($key, $value);
  }
  $config
    ->save();
  $this
    ->messenger()
    ->addStatus($this
    ->t('Configuration updated.'));
}