public function UltimenuManager::clearCachedDefinitions in Ultimenu 8
Clears static and persistent plugin definition caches.
Don't resort to calling \Drupal::cache()->delete() and friends to make Drupal detect new or updated plugin definitions. Always use this method on the appropriate plugin type's plugin manager!
Overrides DefaultPluginManager::clearCachedDefinitions
File
- src/
UltimenuManager.php, line 691
Class
- UltimenuManager
- Manages Ultimenu plugin.
Namespace
Drupal\ultimenuCode
public function clearCachedDefinitions($all = FALSE) {
// Invalidate the theme cache to update ultimenu region-based theme.
$this->themeHandler
->refreshInfo();
if ($all) {
// Clear the skins cache.
$this->skins = NULL;
// Invalidate the block cache to update ultimenu-based derivatives.
if ($this->moduleHandler
->moduleExists('block')) {
\Drupal::service('plugin.manager.block')
->clearCachedDefinitions();
}
}
}