public function CookiesTextsForm::submitForm in COOKiES Consent Management 1.0.x
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/ CookiesTextsForm.php, line 295
Class
- CookiesTextsForm
- Configure site information settings for this site.
Namespace
Drupal\cookies\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('cookies.texts')
->set('bannerText', $form_state
->getValue('bannerText'))
->set('privacyPolicy', $form_state
->getValue('privacyPolicy'))
->set('privacyUri', $form_state
->getValue('privacyUri'))
->set('imprint', $form_state
->getValue('imprint'))
->set('imprintUri', $form_state
->getValue('imprintUri'))
->set('cookieDocs', $form_state
->getValue('cookieDocs'))
->set('cookieDocsUri', $form_state
->getValue('cookieDocsUri'))
->set('denyAll', $form_state
->getValue('denyAll'))
->set('settings', $form_state
->getValue('settings'))
->set('acceptAll', $form_state
->getValue('acceptAll'))
->set('saveSettings', $form_state
->getValue('saveSettings'))
->set('cookieSettings', $form_state
->getValue('cookieSettings'))
->set('close', $form_state
->getValue('close'))
->set('allowed', $form_state
->getValue('allowed'))
->set('denied', $form_state
->getValue('denied'))
->set('requiredCookies', $form_state
->getValue('requiredCookies'))
->set('readMore', $form_state
->getValue('readMore'))
->set('officialWebsite', $form_state
->getValue('officialWebsite'))
->set('alwaysActive', $form_state
->getValue('alwaysActive'))
->set('settingsAllServices', $form_state
->getValue('settingsAllServices'))
->save();
parent::submitForm($form, $form_state);
}