You are here

public function Registry::getRuntime in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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 236
Contains \Drupal\Core\Theme\Registry.

Class

Registry
Defines the theme registry service.

Namespace

Drupal\Core\Theme

Code

public function getRuntime() {
  $this
    ->init($this->themeName);
  if (!isset($this->runtimeRegistry)) {
    $this->runtimeRegistry = new ThemeRegistry('theme_registry:runtime:' . $this->theme
      ->getName(), $this->cache, $this->lock, array(
      'theme_registry',
    ), $this->moduleHandler
      ->isLoaded());
  }
  return $this->runtimeRegistry;
}