function ThemeInstaller::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Extension/ThemeInstaller.php \Drupal\Core\Extension\ThemeInstaller::__construct()
- 10 core/lib/Drupal/Core/Extension/ThemeInstaller.php \Drupal\Core\Extension\ThemeInstaller::__construct()
- 9 core/lib/Drupal/Core/Extension/ThemeInstaller.php \Drupal\Core\Extension\ThemeInstaller::__construct()
- 8.9.x core/lib/Drupal/Core/Extension/ThemeInstaller.php \Drupal\Core\Extension\ThemeInstaller::__construct()
File
-
core/
lib/ Drupal/ Core/ Extension/ ThemeInstaller.php, line 28
Class
- ThemeInstaller
- Manages theme installation/uninstallation.
Namespace
Drupal\Core\ExtensionCode
public function __construct(protected ThemeHandlerInterface $themeHandler, protected ConfigFactoryInterface $configFactory, protected ConfigInstallerInterface $configInstaller, protected ModuleHandlerInterface $moduleHandler, protected ConfigManagerInterface $configManager, #[Autowire(service: 'asset.css.collection_optimizer')] protected AssetCollectionOptimizerInterface $cssCollectionOptimizer, protected RouteBuilderInterface $routeBuilder, #[Autowire(service: 'logger.channel.default')] protected LoggerInterface $logger, protected StateInterface $state, protected ModuleExtensionList $moduleExtensionList, protected Registry $themeRegistry, protected ThemeExtensionList $themeExtensionList, #[Autowire(service: 'kernel')] protected DrupalKernelInterface|CachedDiscoveryInterface|null $kernel = NULL) {
if (!$this->kernel instanceof DrupalKernelInterface) {
@trigger_error('Calling ' . __METHOD__ . ' without the $kernel argument is deprecated in drupal:11.3.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3551652', E_USER_DEPRECATED);
$this->kernel = \Drupal::service('kernel');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.