You are here

protected function BlockManager::setCachedDefinitions in Multiversion 8.2

Same name and namespace in other branches
  1. 8 src/Block/BlockManager.php \Drupal\multiversion\Block\BlockManager::setCachedDefinitions()

Sets a cache of plugin definitions for the decorated discovery class.

Parameters

array $definitions: List of definitions to store in cache.

Overrides DefaultPluginManager::setCachedDefinitions

File

src/Block/BlockManager.php, line 65

Class

BlockManager
Adds the workspace ID to the cache key.

Namespace

Drupal\multiversion\Block

Code

protected function setCachedDefinitions($definitions) {
  $this->cacheKey = $this->workspaceCacheKeyPrefix . $this->workspaceManager
    ->getActiveWorkspace()
    ->id();
  parent::setCachedDefinitions($definitions);
}