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