public function BackgroundProcessSettingsForm::submitForm in Background Process 8
Implements to Submit Form.
Overrides ConfigFormBase::submitForm
File
- src/
Form/ BackgroundProcessSettingsForm.php, line 24
Class
- BackgroundProcessSettingsForm
- Default controller for the background_process module.
Namespace
Drupal\background_process\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('background_process.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);
}