You are here

protected function InstallablePluginManager::getCachedDefinitions in Markdown 8.2

Parameters

bool $runtime: Flag indicating whether to retrieve runtime definitions.

Overrides DefaultPluginManager::getCachedDefinitions

1 call to InstallablePluginManager::getCachedDefinitions()
InstallablePluginManager::getRuntimeDefinitions in src/PluginManager/InstallablePluginManager.php
Retrieves the runtime definitions.

File

src/PluginManager/InstallablePluginManager.php, line 254

Class

InstallablePluginManager
Installable Plugin Manager.

Namespace

Drupal\markdown\PluginManager

Code

protected function getCachedDefinitions($runtime = FALSE) {
  $cacheKey = $this
    ->getCacheKey($runtime);
  if ($runtime) {
    if (!isset(static::$runtimeDefinitions[static::class]) && ($cache = $this
      ->cacheGet($cacheKey))) {
      static::$runtimeDefinitions[static::class] = $cache->data;
    }
    return static::$runtimeDefinitions[static::class];
  }
  else {
    if (!isset($this->definitions) && ($cache = $this
      ->cacheGet($cacheKey))) {
      $this->definitions = $cache->data;
    }
    return $this->definitions;
  }
}