You are here

public function UrlloginForm::submitForm in urllogin 2.x

Same name and namespace in other branches
  1. 8 src/Form/UrlloginForm.php \Drupal\urllogin\Form\UrlloginForm::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/UrlloginForm.php, line 158

Class

UrlloginForm
Implements an urllgoin admin form.

Namespace

Drupal\urllogin\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {

  // Retrieve the configuration.
  $this->configFactory
    ->getEditable('urllogin.settings')
    ->set('passphrase', $form_state
    ->getValue('urllogin_passphrase'))
    ->set('add_dbpass', $form_state
    ->getValue('urllogin_add_dbpass'))
    ->set('codekey', $form_state
    ->getValue('urllogin_codekey'))
    ->set('codemin', $form_state
    ->getValue('urllogin_codemin'))
    ->set('destination', $form_state
    ->getValue('urllogin_destination'))
    ->save();
  parent::submitForm($form, $form_state);
}