You are here

public function TmgmtExtensionSuitSettingsForm::submitForm in TMGMT Extension Suite 8.3

Same name and namespace in other branches
  1. 8 src/Form/TmgmtExtensionSuitSettingsForm.php \Drupal\tmgmt_extension_suit\Form\TmgmtExtensionSuitSettingsForm::submitForm()
  2. 8.2 src/Form/TmgmtExtensionSuitSettingsForm.php \Drupal\tmgmt_extension_suit\Form\TmgmtExtensionSuitSettingsForm::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/TmgmtExtensionSuitSettingsForm.php, line 112

Class

TmgmtExtensionSuitSettingsForm
TMGMT Extension Suit settings form.

Namespace

Drupal\tmgmt_extension_suit\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('tmgmt_extension_suit.settings');
  $config
    ->set('do_track_changes', $form_state
    ->getValue('do_track_changes'));
  \Drupal::state()
    ->set('tmgmt_extension_suit.settings.do_track_changes_by_provider_and_locales', $form_state
    ->getValues());
  $config
    ->save();
  parent::submitForm($form, $form_state);
}