You are here

public function BasicAdvancedForm::submitForm in Auth0 Single Sign On 8

Same name and namespace in other branches
  1. 8.2 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 FormInterface::submitForm

File

src/Form/BasicAdvancedForm.php, line 100
Contains \Drupal\auth0\Form\BasicAdvancedForm.

Class

BasicAdvancedForm
This forms handles the advanced module configurations.

Namespace

Drupal\auth0\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = \Drupal::service('config.factory')
    ->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_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_login_css', $form_state
    ->getValue('auth0_login_css'))
    ->set('auth0_lock_extra_settings', $form_state
    ->getValue('auth0_lock_extra_settings'))
    ->save();
}