You are here

public function LinkIconSettingsForm::submitForm in Link Icon 8

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

Overrides ConfigFormBase::submitForm

File

src/Form/LinkIconSettingsForm.php, line 82

Class

LinkIconSettingsForm
Defines the Slick admin settings form.

Namespace

Drupal\linkicon\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('linkicon.settings')
    ->set('font', $form_state
    ->getValue('font'))
    ->save();

  // Invalidate the library discovery cache to update new icon font.
  $this->libraryDiscovery
    ->clearCachedDefinitions();
  parent::submitForm($form, $form_state);
}