You are here

public function FasttoggleSettingsForm::submitForm in Fasttoggle 8.3

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

Class

FasttoggleSettingsForm
Configure fasttoggle settings for this site.

Namespace

Drupal\fasttoggle\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('fasttoggle.settings')
    ->set('label_style', $values['label_style'])
    ->save();
  $this
    ->messenger()
    ->addMessage($this
    ->t('The configuration options have been saved.'));
}