public function Oauth2TokenSettingsForm::submitForm in Simple OAuth (OAuth2) & OpenID Connect 5.x
Same name and namespace in other branches
- 8.4 src/Entity/Form/Oauth2TokenSettingsForm.php \Drupal\simple_oauth\Entity\Form\Oauth2TokenSettingsForm::submitForm()
- 8.2 src/Entity/Form/Oauth2TokenSettingsForm.php \Drupal\simple_oauth\Entity\Form\Oauth2TokenSettingsForm::submitForm()
- 8.3 src/Entity/Form/Oauth2TokenSettingsForm.php \Drupal\simple_oauth\Entity\Form\Oauth2TokenSettingsForm::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
- src/
Entity/ Form/ Oauth2TokenSettingsForm.php, line 92
Class
- Oauth2TokenSettingsForm
- The settings form.
Namespace
Drupal\simple_oauth\Entity\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$settings = $this
->config('simple_oauth.settings');
$settings
->set('access_token_expiration', $form_state
->getValue('access_token_expiration'));
$settings
->set('authorization_code_expiration', $form_state
->getValue('authorization_code_expiration'));
$settings
->set('refresh_token_expiration', $form_state
->getValue('refresh_token_expiration'));
$settings
->set('token_cron_batch_size', $form_state
->getValue('token_cron_batch_size'));
$settings
->set('public_key', $form_state
->getValue('public_key'));
$settings
->set('private_key', $form_state
->getValue('private_key'));
$settings
->set('remember_clients', $form_state
->getValue('remember_clients'));
$settings
->set('use_implicit', $form_state
->getValue('use_implicit'));
$settings
->save();
parent::submitForm($form, $form_state);
}