Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Registry.php

function Registry::cacheGet

Gets the theme registry cache.

Return value

array|null

1 call to Registry::cacheGet()
Registry::get in core/lib/Drupal/Core/Theme/Registry.php
Returns the complete theme registry from cache or rebuilds it.

File

core/lib/Drupal/Core/Theme/Registry.php, line 291

Class

Registry
Defines the theme registry service.

Namespace

Drupal\Core\Theme

Code

protected function cacheGet() : ?array {
    $theme_name = $this->theme
        ->getName();
    if (isset($this->registry[$theme_name])) {
        return $this->registry[$theme_name];
    }
    elseif ($cache = $this->cache
        ->get('theme_registry:' . $theme_name)) {
        $this->registry[$theme_name] = $cache->data;
        return $this->registry[$theme_name];
    }
    return NULL;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal