public function SettingsForm::submitForm in GoogleTag Manager 8
Implements a form submit handler.
Overrides ConfigFormBase::submitForm
File
- src/
Form/ SettingsForm.php, line 82
Class
- SettingsForm
- Implements the form controller.
Namespace
Drupal\gtm\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('gtm.settings');
$config
->set('enable', $form_state
->getValue('enable'))
->set('admin-pages', $form_state
->getValue('admin-pages'))
->set('admin-disable', $form_state
->getValue('admin-disable'))
->set('google-tag', $form_state
->getValue('google-tag'))
->save();
}