You are here

public function SeedsToolbarSettingsForm::submitForm in Seeds Toolbar 8

Implements \Drupal\Core\Form\FormInterface:submitForm()

Overrides ConfigFormBase::submitForm

File

src/Form/SeedsToolbarSettingsForm.php, line 92

Class

SeedsToolbarSettingsForm
Displays the seeds_toolbar settings form.

Namespace

Drupal\seeds_toolbar\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('seeds_toolbar.settings')
    ->set('compact', $form_state
    ->getValue('compact'))
    ->set('support', $form_state
    ->getValue('support'))
    ->set('custom_style', $form_state
    ->getValue('custom_style'))
    ->set('style', $form_state
    ->getValue('style'))
    ->set('light_logo', $form_state
    ->getValue('light_logo'))
    ->set('dark_logo', $form_state
    ->getValue('dark_logo'))
    ->save();
}