public function BlockManager::clearCachedDefinitions in Multiversion 8
Same name and namespace in other branches
- 8.2 src/Block/BlockManager.php \Drupal\multiversion\Block\BlockManager::clearCachedDefinitions()
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/
Block/ BlockManager.php, line 80
Class
- BlockManager
- Adds the workspace ID to the cache key.
Namespace
Drupal\multiversion\BlockCode
public function clearCachedDefinitions() {
$active_workspace_id = $this->workspaceManager
->getActiveWorkspaceId();
if (isset($active_workspace)) {
$this->cacheKey = $this->workspaceCacheKeyPrefix . $active_workspace_id;
}
parent::clearCachedDefinitions();
}