function ThemeInstaller::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Extension/ThemeInstaller.php \Drupal\Core\Extension\ThemeInstaller::__construct()
  2. 10 core/lib/Drupal/Core/Extension/ThemeInstaller.php \Drupal\Core\Extension\ThemeInstaller::__construct()
  3. 9 core/lib/Drupal/Core/Extension/ThemeInstaller.php \Drupal\Core\Extension\ThemeInstaller::__construct()
  4. 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\Extension

Code

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.