public function PopupSettingsForm::submitForm in Popup Dialog 8.2
Same name and namespace in other branches
- 8 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 226
Class
- PopupSettingsForm
- Class PopupSettingsForm.
Namespace
Drupal\popup_dialog\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
/* $config = \Drupal::config('popup_dialog.settings'); */
$this
->config('popup_dialog.settings')
->set('popup_enabled', $form_state
->getValue('popup_enabled'))
->set('category_settings', $form_state
->getValue('category_settings'))
->set('popup_box_title', $form_state
->getValue('popup_box_title'))
->set('popup_box_body', $form_state
->getValue('popup_box_body'))
->set('list_of_blocks', $form_state
->getValue('list_of_blocks'))
->set('list_of_views', $form_state
->getValue('list_of_views'))
->set('arguments', $form_state
->getValue('arguments'))
->set('delay', $form_state
->getValue('delay'))
->set('popup_top_position', $form_state
->getValue('popup_top_position'))
->set('popup_interval', $form_state
->getValue('popup_interval'))
->set('time_interval', $form_state
->getValue('time_interval'))
->save();
}