You are here

public function BusinessRulesSettingsForm::submitForm in Business Rules 2.x

Same name and namespace in other branches
  1. 8 src/Form/BusinessRulesSettingsForm.php \Drupal\business_rules\Form\BusinessRulesSettingsForm::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/BusinessRulesSettingsForm.php, line 70

Class

BusinessRulesSettingsForm
Provides BusinessRules settings form.

Namespace

Drupal\business_rules\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $enable_scheduler = $form_state
    ->getValue('enable_scheduler');
  $debug_screen = $form_state
    ->getValue('debug_screen');
  $clear_render_cache = $form_state
    ->getValue('clear_render_cache');
  $enable_safemode = $form_state
    ->getValue('enable_safemode');
  $this
    ->config('business_rules.settings')
    ->set('enable_scheduler', $enable_scheduler)
    ->set('debug_screen', $debug_screen)
    ->set('clear_render_cache', $clear_render_cache)
    ->set('enable_safemode', $enable_safemode)
    ->save();
  parent::submitForm($form, $form_state);
}