public function FloodSettings::submitForm in Flood settings 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/ FloodSettings.php, line 166
Class
- FloodSettings
- Class FloodSettings.
Namespace
Drupal\flood_settings\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
foreach ([
'uid_only',
'ip_limit',
'ip_window',
'user_limit',
'user_window',
] as $configKey) {
$this->configFactory
->getEditable(self::SETTINGS_KEY)
->set($configKey, $form_state
->getValue($configKey))
->save();
}
parent::submitForm($form, $form_state);
}