You are here

public function ThemeCacheContext::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Cache/Context/ThemeCacheContext.php \Drupal\Core\Cache\Context\ThemeCacheContext::__construct()
  2. 9 core/lib/Drupal/Core/Cache/Context/ThemeCacheContext.php \Drupal\Core\Cache\Context\ThemeCacheContext::__construct()

Constructs a new ThemeCacheContext service.

Parameters

\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager.

File

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

Class

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

Namespace

Drupal\Core\Cache\Context

Code

public function __construct(ThemeManagerInterface $theme_manager) {
  $this->themeManager = $theme_manager;
}