You are here

public function FancyLoginSettingsForm::submitForm in Fancy Login 8.2

Same name and namespace in other branches
  1. 3.0.x src/Form/FancyLoginSettingsForm.php \Drupal\fancy_login\Form\FancyLoginSettingsForm::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/FancyLoginSettingsForm.php, line 200

Class

FancyLoginSettingsForm
Creates the settings form for the fancy login module.

Namespace

Drupal\fancy_login\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('fancy_login.settings')
    ->set('screen_fade_color', $form_state
    ->getValue('screen_fade_color'))
    ->set('screen_fade_z_index', $form_state
    ->getValue('screen_fade_z_index'))
    ->set('login_box_background_color', $form_state
    ->getValue('login_box_background_color'))
    ->set('login_box_text_color', $form_state
    ->getValue('login_box_text_color'))
    ->set('login_box_border_color', $form_state
    ->getValue('login_box_border_color'))
    ->set('login_box_border_width', $form_state
    ->getValue('login_box_border_width'))
    ->set('login_box_border_style', $form_state
    ->getValue('login_box_border_style'))
    ->set('hide_objects', $form_state
    ->getValue('hide_objects'))
    ->set('dim_fade_time', $form_state
    ->getValue('dim_fade_time'))
    ->set('login_box_fade_time', $form_state
    ->getValue('login_box_fade_time'))
    ->set('no_redirect', $form_state
    ->getValue('no_redirect'))
    ->set('https', $form_state
    ->getValue('https'))
    ->set('icon_position', $form_state
    ->getValue('icon_position'))
    ->save();
  parent::submitForm($form, $form_state);
}