You are here

public function GoogleWebfontLoaderApiSettingsForm::submitForm in Webfont Loader 8

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

Overrides ConfigFormBase::submitForm

File

src/Form/GoogleWebfontLoaderApiSettingsForm.php, line 89

Class

GoogleWebfontLoaderApiSettingsForm
Configure locale settings for this site.

Namespace

Drupal\google_webfont_loader_api\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $config = $this
    ->config('google_webfont_loader_api.settings');
  $config
    ->set('font', $values['google_webfont_loader_api_font'])
    ->set('cache', $values['google_webfont_loader_api_cache'])
    ->set('display_style', $values['google_webfont_loader_api_display_style'])
    ->set('fontinfo_listing', $values['google_webfont_loader_api_font_listing'])
    ->save();
  parent::submitForm($form, $form_state);
  drupal_flush_all_caches();
}