You are here

public function QaAccountsSettingsForm::submitForm in QA Accounts 8

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/QaAccountsSettingsForm.php, line 53

Class

QaAccountsSettingsForm
Configuration form for QA Accounts.

Namespace

Drupal\qa_accounts\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('qa_accounts.settings');
  $config
    ->set('auto_create_user_per_new_role', $form_state
    ->getValue('auto_create_user_per_new_role'))
    ->set('auto_delete_user_per_deleted_role', $form_state
    ->getValue('auto_delete_user_per_deleted_role'))
    ->save();
  parent::submitForm($form, $form_state);
}