You are here

public function AbjsSettingsAdmin::submitForm in A/B Test JS 8

Same name and namespace in other branches
  1. 2.0.x src/Form/AbjsSettingsAdmin.php \Drupal\abjs\Form\AbjsSettingsAdmin::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/AbjsSettingsAdmin.php, line 89

Class

AbjsSettingsAdmin
Build form for settings module.

Namespace

Drupal\abjs\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('abjs.settings')
    ->set('cookie.prefix', $form_state
    ->getValue('cookie_prefix'))
    ->set('cookie.lifetime', $form_state
    ->getValue('cookie_lifetime'))
    ->set('cookie.domain', $form_state
    ->getValue('cookie_domain'))
    ->set('cookie.secure', $form_state
    ->getValue('cookie_secure'))
    ->set('ace', $form_state
    ->getValue('ace'))
    ->save();
  parent::submitForm($form, $form_state);
}