public function FancyConfigForm::submitForm in Better Login Form Configuration 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
- better_login_form_config/
src/ Form/ FancyConfigForm.php, line 230 - Contains \Drupal\better_login_form_config\Form\FancyConfigForm.
Class
Namespace
Drupal\better_login_form_config\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('fancy_login.settings');
$config
->set('form_title', $form_state
->getValue('form_title'));
$config
->set('username_label', $form_state
->getValue('username_label'));
$config
->set('username_description', $form_state
->getValue('username_description'));
$config
->set('password_label', $form_state
->getValue('password_label'));
$config
->set('password_description', $form_state
->getValue('password_description'));
$config
->set('login_button', $form_state
->getValue('login_button'));
$config
->set('create_account', $form_state
->getValue('create_account'));
$config
->set('forgot_password', $form_state
->getValue('forgot_password'));
//$config->set('login_block', $form_state->getValue('login_block'));
$config
->set('forgot_form_title', $form_state
->getValue('forgot_form_title'));
$config
->set('register_form_title', $form_state
->getValue('register_form_title'));
$config
->set('register_form_mail', $form_state
->getValue('register_form_mail'));
$config
->set('register_mail_desc', $form_state
->getValue('register_mail_desc'));
$config
->set('register_form_name', $form_state
->getValue('register_form_name'));
$config
->set('register_form_name_desc', $form_state
->getValue('register_form_name_desc'));
$config
->set('forgot_form_username_desc', $form_state
->getValue('forgot_form_username_desc'));
$config
->set('forgot_form_username', $form_state
->getValue('forgot_form_username'));
$config
->set('forgot_form_button', $form_state
->getValue('forgot_form_button'));
$config
->set('include_login', $form_state
->getValue('include_login'));
$config
->set('include_regi_template', $form_state
->getValue('include_regi_template'));
$config
->set('include_forgot_template', $form_state
->getValue('include_forgot_template'));
$config
->save();
return parent::submitForm($form, $form_state);
drupal_flush_all_caches();
}