public function MediaSettingsForm::submitForm in Cookie Content Blocker 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
- modules/
cookie_content_blocker_media/ src/ Form/ MediaSettingsForm.php, line 93
Class
- MediaSettingsForm
- Form builder to manage settings for Cookie content blocker - Media.
Namespace
Drupal\cookie_content_blocker_media\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) : void {
parent::submitForm($form, $form_state);
$config = $this
->config('cookie_content_blocker_media.settings');
$config
->set('providers', $form_state
->getValue('providers'));
$config
->save();
}