public function RecoveryPassSettingsForm::submitForm in Recovery Password (Email New Password) 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/
RecoveryPassSettingsForm.php, line 114 - Contains \Drupal\recovery_pass\RecoveryPassSettingsForm
Class
- RecoveryPassSettingsForm
- Configure recovery_pass settings for this site.
Namespace
Drupal\recovery_passCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('recovery_pass.settings');
$config
->set('email_subject', $form_state
->getValue('recovery_pass_email_subject'))
->save();
$config
->set('email_body', $form_state
->getValue('recovery_pass_email_body'))
->save();
$config
->set('old_pass_show', $form_state
->getValue('recovery_pass_old_pass_show'))
->save();
$config
->set('old_pass_warning', $form_state
->getValue('recovery_pass_old_pass_warning'))
->save();
$config
->set('fpass_redirect', $form_state
->getValue('recovery_pass_fpass_redirect'))
->save();
$config
->set('expiry_period', $form_state
->getValue('recovery_pass_expiry_period'))
->save();
parent::submitForm($form, $form_state);
}