Skip to content
Snippets Groups Projects
Commit 72dde152 authored by Jacques R. Blier's avatar Jacques R. Blier
Browse files

Issue #3479518 by xmacinfo: Switching color scheme may not take effect until clear cache

parent ee3c38f6
No related branches found
Tags 1.0.2
1 merge request!3Resolve #3479518 "Switching color scheme"
......@@ -52,5 +52,11 @@ class SettingsForm extends ConfigFormBase {
$this->config('xnavigation.settings')
->set('color_scheme', $form_state->getValue('color_scheme'))
->save();
// Clear all caches to apply the new color scheme.
\Drupal::service('cache.render')->invalidateAll(); // Clears the render cache.
\Drupal::service('cache.page')->invalidateAll(); // Clears the page cache.
\Drupal::service('theme.registry')->reset();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment