public function VarnishAdminForm::submitForm in Varnish 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/ VarnishAdminForm.php, line 159
Class
Namespace
Drupal\varnish\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('varnish.settings')
->set('varnish_flush_cron', $form_state
->getValue('varnish_flush_cron'))
->set('varnish_version', $form_state
->getValue('varnish_version'))
->set('varnish_control_terminal', $form_state
->getValue('varnish_control_terminal'))
->set('varnish_control_key', $form_state
->getValue('varnish_control_key'))
->set('varnish_socket_timeout', $form_state
->getValue('varnish_socket_timeout'))
->set('varnish_cache_clear', $form_state
->getValue('varnish_cache_clear'))
->set('varnish_bantype', $form_state
->getValue('varnish_bantype'))
->save();
parent::submitForm($form, $form_state);
}