ThemeRegistry::initializeRegistry

ThemeRegistry::initializeRegistry() Initializes the full theme registry. Return value An array with the keys of the full theme registry, but the values initialized to NULL. File core/lib/Drupal/Core/Utility/ThemeRegistry.php, line 84 Class ThemeRegistry Builds the run-time theme registry. Namespace Drupal\Core\Utility Code function initializeRegistry() { // @todo DIC this. $this->completeRegistry = \Drupal::service('theme.registry')->get(); return array_fill_keys(array_ke

ThemeRegistry::__construct

ThemeRegistry::__construct($cid, CacheBackendInterface $cache, LockBackendInterface $lock, $tags = array(), $modules_loaded = FALSE) Constructs a ThemeRegistry object. Parameters string $cid: The cid for the array being cached. \Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend. \Drupal\Core\Lock\LockBackendInterface $lock: The lock backend. array $tags: (optional) The tags to specify for the cache item. bool $modules_loaded: Whether all modules have already been loaded. Overri

ThemeRegistry::has

public ThemeRegistry::has($key) Returns whether data exists for this key. Parameters string $key: Key that identifies the data. Overrides CacheCollector::has File core/lib/Drupal/Core/Utility/ThemeRegistry.php, line 94 Class ThemeRegistry Builds the run-time theme registry. Namespace Drupal\Core\Utility Code public function has($key) { // Since the theme registry allows for theme hooks to be requested that // are not registered, just check the existence of the key in the registry.

ThemeRegistry::resolveCacheMiss

public ThemeRegistry::resolveCacheMiss($key) Resolves a cache miss. When an offset is not found in the object, this is treated as a cache miss. This method allows classes using this implementation to look up the actual value and allow it to be cached. Parameters string $key: The offset that was requested. Return value mixed The value of the offset, or NULL if no value was found. Overrides CacheCollector::resolveCacheMiss File core/lib/Drupal/Core/Utility/ThemeRegistry.php, line 120 Class

ThemeRegistry::$persistable

Whether the partial registry can be persisted to the cache. This is only allowed if all modules and the request method is GET. _theme() should be very rarely called on POST requests and this avoids polluting the runtime cache. File core/lib/Drupal/Core/Utility/ThemeRegistry.php, line 28 Class ThemeRegistry Builds the run-time theme registry. Namespace Drupal\Core\Utility Code protected $persistable;

ThemeRegistry::get

public ThemeRegistry::get($key) Gets value from the cache. Parameters string $key: Key that identifies the data. Return value mixed The corresponding cache data. Overrides CacheCollector::get File core/lib/Drupal/Core/Utility/ThemeRegistry.php, line 105 Class ThemeRegistry Builds the run-time theme registry. Namespace Drupal\Core\Utility Code public function get($key) { // If the offset is set but empty, it is a registered theme hook that has // not yet been requested. Offsets th

ThemeRegistry::$completeRegistry

The complete theme registry array. File core/lib/Drupal/Core/Utility/ThemeRegistry.php, line 33 Class ThemeRegistry Builds the run-time theme registry. Namespace Drupal\Core\Utility Code protected $completeRegistry;

ThemeRegistry

Builds the run-time theme registry. A cache collector to allow the theme registry to be accessed as a complete registry, while internally caching only the parts of the registry that are actually in use on the site. On cache misses the complete theme registry is loaded and used to update the run-time cache. Hierarchy class \Drupal\Core\Cache\CacheCollector implements CacheCollectorInterface, DestructableInterfaceclass \Drupal\Core\Utility\ThemeRegistry implements DestructableInterface File c

ThemeNegotiatorInterface

Defines an interface for classes which determine the active theme. To set the active theme, create a new service tagged with 'theme_negotiator' (see the theme.negotiator.admin_theme service in user.services.yml for an example). Your service class needs to implement this interface. If you are setting a theme which is closely tied to the functionality of a particular page or set of pages (such that the page might not function correctly if a different theme is used), make sure to set the priority

ThemeNegotiatorInterface::determineActiveTheme

public ThemeNegotiatorInterface::determineActiveTheme(RouteMatchInterface $route_match) Determine the active theme for the request. Parameters \Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match object. Return value string|null The name of the theme, or NULL if other negotiators, like the configured default one, should be used instead. File core/lib/Drupal/Core/Theme/ThemeNegotiatorInterface.php, line 46 Class ThemeNegotiatorInterface Defines an interface for c