function ModuleInstaller::__construct
Same name in this branch
- 10 core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php \Drupal\Core\ProxyClass\Extension\ModuleInstaller::__construct()
Same name in other branches
- 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()
- 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()
Constructs a new ModuleInstaller instance.
Parameters
string $root: The app root.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\DrupalKernelInterface $kernel: The drupal kernel.
\Drupal\Core\Database\Connection $connection: The database connection.
\Drupal\Core\Update\UpdateHookRegistry $update_registry: The update registry service.
\Psr\Log\LoggerInterface|null $logger: The logger.
See also
\Drupal\Core\CoreServiceProvider
File
-
core/
lib/ Drupal/ Core/ Extension/ ModuleInstaller.php, line 92
Class
- ModuleInstaller
- Default implementation of the module installer.
Namespace
Drupal\Core\ExtensionCode
public function __construct($root, ModuleHandlerInterface $module_handler, DrupalKernelInterface $kernel, Connection $connection, UpdateHookRegistry $update_registry, ?LoggerInterface $logger = NULL) {
$this->root = $root;
$this->moduleHandler = $module_handler;
$this->kernel = $kernel;
$this->connection = $connection;
$this->updateRegistry = $update_registry;
if ($this->logger === NULL) {
@trigger_error('Calling ' . __METHOD__ . ' without the $logger argument is deprecated in drupal:10.1.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/2932520', E_USER_DEPRECATED);
$this->logger = \Drupal::service('logger.channel.system');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.