function ModuleInstaller::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php \Drupal\Core\ProxyClass\Extension\ModuleInstaller::__construct()
- 11.x core/lib/Drupal/Core/Extension/ModuleInstaller.php \Drupal\Core\Extension\ModuleInstaller::__construct()
- 10 core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php \Drupal\Core\ProxyClass\Extension\ModuleInstaller::__construct()
- 10 core/lib/Drupal/Core/Extension/ModuleInstaller.php \Drupal\Core\Extension\ModuleInstaller::__construct()
- 9 core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php \Drupal\Core\ProxyClass\Extension\ModuleInstaller::__construct()
- 9 core/lib/Drupal/Core/Extension/ModuleInstaller.php \Drupal\Core\Extension\ModuleInstaller::__construct()
- 8.9.x core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php \Drupal\Core\ProxyClass\Extension\ModuleInstaller::__construct()
- 8.9.x core/lib/Drupal/Core/Extension/ModuleInstaller.php \Drupal\Core\Extension\ModuleInstaller::__construct()
File
-
core/
lib/ Drupal/ Core/ Extension/ ModuleInstaller.php, line 69
Class
- ModuleInstaller
- Default implementation of the module installer.
Namespace
Drupal\Core\ExtensionCode
public function __construct(#[Autowire(param: 'app.root')] string $root, ModuleHandlerInterface $module_handler, DrupalKernelInterface $kernel, Connection $connection, UpdateHookRegistry $update_registry, #[Autowire(service: 'logger.channel.default')] protected LoggerInterface $logger, #[AutowireIterator(tag: 'module_install.uninstall_validator')] protected \Traversable $uninstallValidators, protected ?ModuleWeight $moduleWeight) {
$this->root = $root;
$this->moduleHandler = $module_handler;
$this->kernel = $kernel;
$this->connection = $connection;
$this->updateRegistry = $update_registry;
if (!$this->moduleWeight instanceof ModuleWeight) {
@trigger_error('Calling ' . __METHOD__ . '() without the $moduleWeight argument is deprecated in drupal:11.5.0 and the argument will be required in drupal:12.0.0. See https://www.drupal.org/project/drupal/issues/3595653', E_USER_DEPRECATED);
$this->moduleWeight = \Drupal::service(ModuleWeight::class);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.