function Registry::getRuntime
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::getRuntime()
- 10 core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::getRuntime()
- 11.x core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::getRuntime()
Returns the incomplete, runtime theme registry.
Return value
\Drupal\Core\Utility\ThemeRegistry A shared instance of the ThemeRegistry class, provides an ArrayObject that allows it to be accessed with array syntax and isset(), and is more lightweight than the full registry.
File
-
core/
lib/ Drupal/ Core/ Theme/ Registry.php, line 276
Class
- Registry
- Defines the theme registry service.
Namespace
Drupal\Core\ThemeCode
public function getRuntime() {
$this->init($this->themeName);
if (!isset($this->runtimeRegistry[$this->theme
->getName()])) {
$this->runtimeRegistry[$this->theme
->getName()] = new ThemeRegistry('theme_registry:runtime:' . $this->theme
->getName(), $this->runtimeCache ?: $this->cache, $this->lock, [
'theme_registry',
], $this->moduleHandler
->isLoaded());
}
return $this->runtimeRegistry[$this->theme
->getName()];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.