You are here

public function SettingsForm::submitForm in Adminimal Admin Toolbar 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 ConfigFormBase::submitForm

File

src/Form/SettingsForm.php, line 53
Contains \Drupal\adminimal_admin_toolbar\Form\SettingsForm.

Class

SettingsForm
Configure menu link weight settings.

Namespace

Drupal\adminimal_admin_toolbar\Form

Code

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