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

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

Class

ElementInfoManager
Provides a plugin manager for element plugins.

Namespace

Drupal\Core\Render

Code

protected function getCachedDefinitions() : ?array {
  if (!isset($this->definitions) && ($cache = $this->cacheGet($this->cacheKey))) {
    $this->definitions = $cache->data['definitions'];
    $this->reverseMapping = $cache->data['reverse_mapping'];
  }
  return $this->definitions;
}

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