public function GeshiFilterSettingsForm::flushLanguageDefinitionCache in GeSHi Filter for syntax highlighting 8
Same name and namespace in other branches
- 8.2 src/Form/GeshiFilterSettingsForm.php \Drupal\geshifilter\Form\GeshiFilterSettingsForm::flushLanguageDefinitionCache()
Helper function for flushing the GeSHi language definition cache.
File
- src/
Form/ GeshiFilterSettingsForm.php, line 299
Class
- GeshiFilterSettingsForm
- Form with the settings for the module.
Namespace
Drupal\geshifilter\FormCode
public function flushLanguageDefinitionCache() {
$config = \Drupal::config('geshifilter.settings');
if (GeshiFilter::CSS_CLASSES_AUTOMATIC == $config
->get('css_mode')) {
// Forced regeneration of the CSS file.
GeshiFilterCss::generateLanguagesCssFile(TRUE);
}
$cache = \Drupal::cache();
$cache
->delete('geshifilter_available_languages_cache');
drupal_set_message($this
->t('Flushed the GeSHi language definition cache.'));
}