function SettingsForm::submitForm

Same name in other branches
  1. 5.x src/Form/SettingsForm.php \Drupal\devel\Form\SettingsForm::submitForm()

Overrides ConfigFormBase::submitForm

File

src/Form/SettingsForm.php, line 185

Class

SettingsForm
Defines a form that configures devel settings.

Namespace

Drupal\devel\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
    $values = $form_state->getValues();
    $this->config('devel.settings')
        ->set('page_alter', $values['page_alter'])
        ->set('raw_names', $values['raw_names'])
        ->set('error_handlers', $values['error_handlers'])
        ->set('rebuild_theme', $values['rebuild_theme'])
        ->set('devel_dumper', $values['dumper'])
        ->set('debug_logfile', $values['debug_logfile'] ?: 'temporary://drupal_debug.txt')
        ->set('debug_pre', $values['debug_pre'])
        ->save();
    parent::submitForm($form, $form_state);
}