public function ManageDialog::submitForm in TacJS 8.5
Same name and namespace in other branches
- 8.6 src/Form/Steps/ManageDialog.php \Drupal\tacjs\Form\Steps\ManageDialog::submitForm()
- 8.3 src/Form/Steps/ManageDialog.php \Drupal\tacjs\Form\Steps\ManageDialog::submitForm()
- 8.4 src/Form/Steps/ManageDialog.php \Drupal\tacjs\Form\Steps\ManageDialog::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/ Steps/ ManageDialog.php, line 238
Class
- ManageDialog
- Class ManageDialog.
Namespace
Drupal\tacjs\Form\StepsCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('tacjs.settings');
$config
->set('dialog.privacyUrl', $form_state
->getValue('privacyUrl'))
->set('dialog.hashtag', $form_state
->getValue('hashtag'))
->set('dialog.cookieName', $form_state
->getValue('cookieName'))
->set('dialog.orientation', $form_state
->getValue('orientation'))
->set('dialog.bodyPosition', $form_state
->getValue('bodyPosition'))
->set('dialog.showAlertSmall', $form_state
->getValue('showAlertSmall'))
->set('dialog.cookieslist', $form_state
->getValue('cookieslist'))
->set('dialog.showIcon', $form_state
->getValue('showIcon'))
->set('dialog.iconPosition', $form_state
->getValue('iconPosition'))
->set('dialog.adblocker', $form_state
->getValue('adblocker'))
->set('dialog.DenyAllCta', $form_state
->getValue('DenyAllCta'))
->set('dialog.AcceptAllCta', $form_state
->getValue('AcceptAllCta'))
->set('dialog.highPrivacy', $form_state
->getValue('highPrivacy'))
->set('dialog.handleBrowserDNTRequest', $form_state
->getValue('handleBrowserDNTRequest'))
->set('dialog.removeCredit', $form_state
->getValue('removeCredit'))
->set('dialog.moreInfoLink', $form_state
->getValue('moreInfoLink'))
->set('dialog.useExternalCss', $form_state
->getValue('useExternalCss'))
->set('dialog.useExternalJs', $form_state
->getValue('useExternalJs'))
->set('dialog.cookieDomain', $form_state
->getValue('cookieDomain'))
->set('dialog.readmoreLink', $form_state
->getValue('readmoreLink'))
->set('dialog.mandatory', $form_state
->getValue('mandatory'))
->set('expire', $form_state
->getValue('expire'))
->save();
parent::submitForm($form, $form_state);
}