public function GoogleAuthSettingsForm::submitForm in Social Auth Google 3.x
Same name and namespace in other branches
- 8.2 src/Form/GoogleAuthSettingsForm.php \Drupal\social_auth_google\Form\GoogleAuthSettingsForm::submitForm()
- 8 src/Form/GoogleAuthSettingsForm.php \Drupal\social_auth_google\Form\GoogleAuthSettingsForm::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 SocialAuthSettingsForm::submitForm
File
- src/
Form/ GoogleAuthSettingsForm.php, line 116
Class
- GoogleAuthSettingsForm
- Settings form for Social Auth Google.
Namespace
Drupal\social_auth_google\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
$this
->config('social_auth_google.settings')
->set('client_id', trim($values['client_id']))
->set('client_secret', trim($values['client_secret']))
->set('scopes', $values['scopes'])
->set('endpoints', $values['endpoints'])
->set('restricted_domain', $values['restricted_domain'])
->save();
parent::submitForm($form, $form_state);
}