You are here

public function SettingsForm::submitForm in Devel 8

Same name and namespace in other branches
  1. 8.3 src/Form/SettingsForm.php \Drupal\devel\Form\SettingsForm::submitForm()
  2. 8.2 src/Form/SettingsForm.php \Drupal\devel\Form\SettingsForm::submitForm()
  3. 4.x src/Form/SettingsForm.php \Drupal\devel\Form\SettingsForm::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/SettingsForm.php, line 158

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'])
    ->save();
  parent::submitForm($form, $form_state);
}