public function cookieBannerConfigForm::submitForm in Cookie_Banner 8
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/ cookieBannerConfigForm.php, line 97 - Contains Drupal\cookie_banner\Form\cookieBannerConfigForm.
Class
- cookieBannerConfigForm
- Class cookieBannerConfigForm.
Namespace
Drupal\cookie_banner\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('cookie_banner.settings')
->set('use_cookie_message', $form_state
->getValue('use_cookie_message'))
->set('more_info_url', $form_state
->getValue('more_info_url'))
->set('more_info_message', $form_state
->getValue('more_info_message'))
->save();
}