public function StepSettingsTacjsForm::submitForm in TacJS 8.2
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 FormInterface::submitForm
File
- src/
Form/ Steps/ StepSettingsTacjsForm.php, line 118
Class
- StepSettingsTacjsForm
- Class StepOneForm.
Namespace
Drupal\tacjs\Form\StepsCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = \Drupal::getContainer()
->get('config.factory')
->getEditable('tacjs.admin_settings_form');
// Save values.
$config
->set('cookie_name', $form_state
->getValue('cookie_name'));
$config
->set('high_privacy', $form_state
->getValue('high_privacy'));
$config
->set('orientation', $form_state
->getValue('orientation'));
$config
->set('adblocker', $form_state
->getValue('adblocker'));
$config
->set('show_alertSmall', $form_state
->getValue('show_alertSmall'));
$config
->set('removeCredit', $form_state
->getValue('removeCredit'));
$config
->set('cookieslist', $form_state
->getValue('cookieslist'));
$config
->set('orientation', $form_state
->getValue('orientation'));
$config
->set('handleBrowserDNTRequest', $form_state
->getValue('handleBrowserDNTRequest'));
$config
->save();
// Redirect to step one.
$form_state
->setRedirect('system.admin_config');
}