public function BasicAdvancedForm::submitForm in Auth0 Single Sign On 8.2
Same name and namespace in other branches
- 8 src/Form/BasicAdvancedForm.php \Drupal\auth0\Form\BasicAdvancedForm::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/
Form/ BasicAdvancedForm.php, line 189 - Contains \Drupal\auth0\Form\BasicAdvancedForm.
Class
- BasicAdvancedForm
- This forms handles the advanced module configurations.
Namespace
Drupal\auth0\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->configFactory()
->getEditable('auth0.settings');
$config
->set('auth0_form_title', $form_state
->getValue('auth0_form_title'))
->set('auth0_allow_signup', $form_state
->getValue('auth0_allow_signup'))
->set('auth0_allow_offline_access', $form_state
->getValue('auth0_allow_offline_access'))
->set('auth0_redirect_for_sso', $form_state
->getValue('auth0_redirect_for_sso'))
->set('auth0_widget_cdn', $form_state
->getValue('auth0_widget_cdn'))
->set('auth0_requires_verified_email', $form_state
->getValue('auth0_requires_verified_email'))
->set('auth0_join_user_by_mail_enabled', $form_state
->getValue('auth0_join_user_by_mail_enabled'))
->set('auth0_username_claim', $form_state
->getValue('auth0_username_claim'))
->set('auth0_login_css', $form_state
->getValue('auth0_login_css'))
->set('auth0_auto_register', $form_state
->getValue('auth0_auto_register'))
->set('auth0_lock_extra_settings', $form_state
->getValue('auth0_lock_extra_settings'))
->set('auth0_claim_mapping', $form_state
->getValue('auth0_claim_mapping'))
->set('auth0_claim_to_use_for_role', $form_state
->getValue('auth0_claim_to_use_for_role'))
->set('auth0_role_mapping', $form_state
->getValue('auth0_role_mapping'))
->set('auth0_username_claim', $form_state
->getValue('auth0_username_claim'))
->save();
$this
->messenger()
->addStatus($this
->t('Saved!'));
}