W3cubDocs

/Drupal 8

public function ThemeHandler::__construct

public ThemeHandler::__construct($root, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, StateInterface $state, InfoParserInterface $info_parser, ExtensionDiscovery $extension_discovery = NULL)

Constructs a new ThemeHandler.

Parameters

string $root: The app root.

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

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

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

\Drupal\Core\Extension\InfoParserInterface $info_parser: The info parser to parse the theme.info.yml files.

\Drupal\Core\Extension\ExtensionDiscovery $extension_discovery: (optional) A extension discovery instance (for unit tests).

File

core/lib/Drupal/Core/Extension/ThemeHandler.php, line 128

Class

ThemeHandler
Default theme handler using the config system to store installation statuses.

Namespace

Drupal\Core\Extension

Code

public function __construct($root, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, StateInterface $state, InfoParserInterface $info_parser, ExtensionDiscovery $extension_discovery = NULL) {
  $this->root = $root;
  $this->configFactory = $config_factory;
  $this->moduleHandler = $module_handler;
  $this->state = $state;
  $this->infoParser = $info_parser;
  $this->extensionDiscovery = $extension_discovery;
}

© 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!ThemeHandler.php/function/ThemeHandler::__construct/8.1.x