public function SettingsForm::submitForm in Logs HTTP 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/ SettingsForm.php, line 82
Class
- SettingsForm
- Defines a form that configures Logs http settings.
Namespace
Drupal\logs_http\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('logs_http.settings');
foreach ($this
->defaultKeys() as $key) {
$config
->set($key, $form_state
->getValue($key));
}
$config
->save();
parent::submitForm($form, $form_state);
}