You are here

public function LogStdoutConfigForm::submitForm in log_stdout 8

Same name and namespace in other branches
  1. 8.2 src/Form/LogStdoutConfigForm.php \Drupal\log_stdout\Form\LogStdoutConfigForm::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/LogStdoutConfigForm.php, line 69

Class

LogStdoutConfigForm
Provides a settings form for stdout logging.

Namespace

Drupal\log_stdout\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('log_stdout.settings');
  $config
    ->set('format', $form_state
    ->getValue('format'));
  $config
    ->set('use_stderr', $form_state
    ->getValue('use_stderr'));
  $config
    ->save();
  return parent::submitForm($form, $form_state);
}