function ExtensionList::__construct

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::__construct()
  2. 10 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::__construct()
  3. 11.x core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::__construct()

Constructs a new instance.

Parameters

string $root: The app root.

string $type: The extension type.

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

\Drupal\Core\Extension\InfoParserInterface $info_parser: The info parser.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

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

string $install_profile: The install profile used by the site.

2 calls to ExtensionList::__construct()
ModuleExtensionList::__construct in core/lib/Drupal/Core/Extension/ModuleExtensionList.php
Constructs a new ModuleExtensionList instance.
ThemeExtensionList::__construct in core/lib/Drupal/Core/Extension/ThemeExtensionList.php
Constructs a new ThemeExtensionList instance.
2 methods override ExtensionList::__construct()
ModuleExtensionList::__construct in core/lib/Drupal/Core/Extension/ModuleExtensionList.php
Constructs a new ModuleExtensionList instance.
ThemeExtensionList::__construct in core/lib/Drupal/Core/Extension/ThemeExtensionList.php
Constructs a new ThemeExtensionList instance.

File

core/lib/Drupal/Core/Extension/ExtensionList.php, line 135

Class

ExtensionList
Provides available extensions.

Namespace

Drupal\Core\Extension

Code

public function __construct($root, $type, CacheBackendInterface $cache, InfoParserInterface $info_parser, ModuleHandlerInterface $module_handler, StateInterface $state, $install_profile) {
    $this->root = $root;
    $this->type = $type;
    $this->cache = $cache;
    $this->infoParser = $info_parser;
    $this->moduleHandler = $module_handler;
    $this->state = $state;
    $this->installProfile = $install_profile;
}

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