You are here

public function DevelopmentEnvironmentSettingsForm::submitForm in Development Environment 8

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 FormInterface::submitForm

File

src/Form/DevelopmentEnvironmentSettingsForm.php, line 123

Class

DevelopmentEnvironmentSettingsForm
DevelopmentEnvironmentConfigurationForm class.

Namespace

Drupal\development_environment\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->state
    ->set('development_environment.log_emails', $form_state
    ->getValue('log_emails'));
  $this
    ->messenger()
    ->addStatus('The settings have been updated');
}