You are here

public function ModulesWeightAdminSettings::submitForm in Modules weight 8

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

Class

ModulesWeightAdminSettings
Class ModulesWeightAdminSettings.

Namespace

Drupal\modules_weight\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);

  // Saving the module configuration.
  $this
    ->config('modules_weight.settings')
    ->set('show_system_modules', $form_state
    ->getValue('show_system_modules'))
    ->save();
}