You are here

public function GoogleAuthSettingsForm::submitForm in Social Auth Google 8

Same name and namespace in other branches
  1. 8.2 src/Form/GoogleAuthSettingsForm.php \Drupal\social_auth_google\Form\GoogleAuthSettingsForm::submitForm()
  2. 3.x src/Form/GoogleAuthSettingsForm.php \Drupal\social_auth_google\Form\GoogleAuthSettingsForm::submitForm()

File

src/Form/GoogleAuthSettingsForm.php, line 75

Class

GoogleAuthSettingsForm
Settings form for Social Auth Google.

Namespace

Drupal\social_auth_google\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('social_auth_google.settings')
    ->set('client_id', $values['client_id'])
    ->set('client_secret', $values['client_secret'])
    ->set('restricted_domain', $values['restricted_domain'])
    ->save();
  parent::submitForm($form, $form_state);
}