public function DbMaintenanceAdminSettings::submitForm in DB Maintenance 8
Same name and namespace in other branches
- 8.2 src/Form/DbMaintenanceAdminSettings.php \Drupal\db_maintenance\Form\DbMaintenanceAdminSettings::submitForm()
- 2.0.x src/Form/DbMaintenanceAdminSettings.php \Drupal\db_maintenance\Form\DbMaintenanceAdminSettings::submitForm()
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/ DbMaintenanceAdminSettings.php, line 34 - Contains \Drupal\db_maintenance\Form\DbMaintenanceAdminSettings.
Class
Namespace
Drupal\db_maintenance\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('db_maintenance.settings');
foreach (Element::children($form) as $variable) {
$config
->set($variable, $form_state
->getValue($form[$variable]['#parents']));
}
$config
->save();
if (method_exists($this, '_submitForm')) {
$this
->_submitForm($form, $form_state);
}
parent::submitForm($form, $form_state);
}