You are here

protected function BlockManager::getCachedDefinitions in Multiversion 8

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

Returns the cached plugin definitions of the decorated discovery class.

Return value

array|null On success this will return an array of plugin definitions. On failure this should return NULL, indicating to other methods that this has not yet been defined. Success with no values should return as an empty array and would actually be returned by the getDefinitions() method.

Overrides DefaultPluginManager::getCachedDefinitions

File

src/Block/BlockManager.php, line 91

Class

BlockManager
Adds the workspace ID to the cache key.

Namespace

Drupal\multiversion\Block

Code

protected function getCachedDefinitions() {
  $this->cacheKey = $this->workspaceCacheKeyPrefix . $this->workspaceManager
    ->getActiveWorkspaceId();
  parent::getCachedDefinitions();
}