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

Breadcrumb

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

function ThemeCacheContext::getContext

Overrides CacheContextInterface::getContext

File

core/lib/Drupal/Core/Cache/Context/ThemeCacheContext.php, line 42

Class

ThemeCacheContext
Defines the ThemeCacheContext service, for "per theme" caching.

Namespace

Drupal\Core\Cache\Context

Code

public function getContext() {
    return $this->themeManager
        ->getActiveTheme()
        ->getName() ?: 'stark';
}
RSS feed
Powered by Drupal