function ThemeInitialization::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Theme/ThemeInitialization.php \Drupal\Core\Theme\ThemeInitialization::__construct()
  2. 10 core/lib/Drupal/Core/Theme/ThemeInitialization.php \Drupal\Core\Theme\ThemeInitialization::__construct()
  3. 9 core/lib/Drupal/Core/Theme/ThemeInitialization.php \Drupal\Core\Theme\ThemeInitialization::__construct()
  4. 8.9.x core/lib/Drupal/Core/Theme/ThemeInitialization.php \Drupal\Core\Theme\ThemeInitialization::__construct()

Constructs a new ThemeInitialization object.

Parameters

string $root: The app root.

\Drupal\Core\Extension\ThemeHandlerInterface $themeHandler: The theme handler.

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: The module handler to use to load modules.

\Psr\Container\ContainerInterface $themeEngines: The theme engines.

File

core/lib/Drupal/Core/Theme/ThemeInitialization.php, line 39

Class

ThemeInitialization
Provides the theme initialization logic.

Namespace

Drupal\Core\Theme

Code

public function __construct(#[Autowire(param: 'app.root')] protected $root, protected ThemeHandlerInterface $themeHandler, #[Autowire(service: 'cache.bootstrap')] protected CacheBackendInterface $cache, protected ModuleHandlerInterface $moduleHandler, #[AutowireLocator('theme_engine', 'engine_name')] private ContainerInterface $themeEngines) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.