public function ThemeInstaller::__construct

public ThemeInstaller::__construct(ThemeHandlerInterface $theme_handler, ConfigFactoryInterface $config_factory, ConfigInstallerInterface $config_installer, ModuleHandlerInterface $module_handler, ConfigManagerInterface $config_manager, AssetCollectionOptimizerInterface $css_collection_optimizer, RouteBuilderInterface $route_builder, LoggerInterface $logger, StateInterface $state)

Constructs a new ThemeInstaller.

Parameters

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

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory to get the installed themes.

\Drupal\Core\Config\ConfigInstallerInterface $config_installer: (optional) The config installer to install configuration. This optional to allow the theme handler to work before Drupal is installed and has a database.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to fire themes_installed/themes_uninstalled hooks.

\Drupal\Core\Config\ConfigManagerInterface $config_manager: The config manager used to uninstall a theme.

\Drupal\Core\Asset\AssetCollectionOptimizerInterface $css_collection_optimizer: The CSS asset collection optimizer service.

\Drupal\Core\Routing\RouteBuilderInterface $route_builder: (optional) The route builder service to rebuild the routes if a theme is installed.

\Psr\Log\LoggerInterface $logger: A logger instance.

\Drupal\Core\State\StateInterface $state: The state store.

File

core/lib/Drupal/Core/Extension/ThemeInstaller.php, line 85

Class

ThemeInstaller
Manages theme installation/uninstallation.

Namespace

Drupal\Core\Extension

Code

public function __construct(ThemeHandlerInterface $theme_handler, ConfigFactoryInterface $config_factory, ConfigInstallerInterface $config_installer, ModuleHandlerInterface $module_handler, ConfigManagerInterface $config_manager, AssetCollectionOptimizerInterface $css_collection_optimizer, RouteBuilderInterface $route_builder, LoggerInterface $logger, StateInterface $state) {
  $this->themeHandler = $theme_handler;
  $this->configFactory = $config_factory;
  $this->configInstaller = $config_installer;
  $this->moduleHandler = $module_handler;
  $this->configManager = $config_manager;
  $this->cssCollectionOptimizer = $css_collection_optimizer;
  $this->routeBuilder = $route_builder;
  $this->logger = $logger;
  $this->state = $state;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Extension!ThemeInstaller.php/function/ThemeInstaller::__construct/8.1.x