You are here

public function PopupSettingsForm::submitForm in Popup Dialog 8

Same name and namespace in other branches
  1. 8.2 src/Form/PopupSettingsForm.php \Drupal\popup_dialog\Form\PopupSettingsForm::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/PopupSettingsForm.php, line 89

Class

PopupSettingsForm
Class PopupSettingsForm.

Namespace

Drupal\popup_dialog\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('popup_dialog.settings')
    ->set('popup_enabled', $form_state
    ->getValue('popup_enabled'))
    ->set('popup_box_title', $form_state
    ->getValue('popup_box_title'))
    ->set('popup_box_body', $form_state
    ->getValue('popup_box_body'))
    ->set('delay', $form_state
    ->getValue('delay'))
    ->set('popup_top_position', $form_state
    ->getValue('popup_top_position'))
    ->save();
}