function ElementInfoManager::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

core/lib/Drupal/Core/Render/ElementInfoManager.php, line 114

Class

ElementInfoManager
Provides a plugin manager for element plugins.

Namespace

Drupal\Core\Render

Code

protected function setCachedDefinitions($definitions) : void {
  $data = [
    'definitions' => $definitions,
    'reverse_mapping' => $this->reverseMapping,
  ];
  $this->cacheSet($this->cacheKey, $data, Cache::PERMANENT, $this->cacheTags);
  $this->definitions = $definitions;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.