public function SlickSettingsForm::submitForm in Slick Carousel 8.2
Same name and namespace in other branches
- 8 slick_ui/src/Form/SlickSettingsForm.php \Drupal\slick_ui\Form\SlickSettingsForm::submitForm()
- 7.3 slick_ui/src/Form/SlickSettingsForm.php \Drupal\slick_ui\Form\SlickSettingsForm::submitForm()
Implements \Drupal\Core\Form\FormInterface::submitForm().
Overrides ConfigFormBase::submitForm
File
- slick_ui/
src/ Form/ SlickSettingsForm.php, line 112
Class
- SlickSettingsForm
- Defines the Slick admin settings form.
Namespace
Drupal\slick_ui\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->configFactory
->getEditable('slick.settings')
->set('library', $form_state
->getValue('library'))
->set('slick_css', $form_state
->getValue('slick_css'))
->set('module_css', $form_state
->getValue('module_css'))
->set('disable_old_skins', $form_state
->getValue('disable_old_skins'))
->set('sitewide', (int) $form_state
->getValue('sitewide'))
->save();
// Invalidate the library discovery cache to update new assets.
$this->libraryDiscovery
->clearCachedDefinitions();
$this->configFactory
->clearStaticCache();
parent::submitForm($form, $form_state);
}