You are here

public function SettingsForm::submitForm in Simple Meta 8

Same name and namespace in other branches
  1. 8.2 src/Form/SettingsForm.php \Drupal\simplemeta\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 53

Class

SettingsForm
Class SettingsForm.

Namespace

Drupal\simplemeta\Form

Code

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