Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ModuleInstaller.php

function ModuleInstaller::__construct

Same name in this branch
  1. 11.1.x core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php \Drupal\Core\ProxyClass\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.

\Traversable|null $uninstallValidators: The uninstall validator services.

See also

\Drupal\Core\DrupalKernel

\Drupal\Core\CoreServiceProvider

File

core/lib/Drupal/Core/Extension/ModuleInstaller.php, line 89

Class

ModuleInstaller
Default implementation of the module installer.

Namespace

Drupal\Core\Extension

Code

public function __construct(string $root, ModuleHandlerInterface $module_handler, DrupalKernelInterface $kernel, Connection $connection, UpdateHookRegistry $update_registry, LoggerInterface $logger, ?\Traversable $uninstallValidators = NULL) {
    $this->root = $root;
    $this->moduleHandler = $module_handler;
    $this->kernel = $kernel;
    $this->connection = $connection;
    $this->updateRegistry = $update_registry;
    if ($this->uninstallValidators === NULL) {
        $this->uninstallValidators = \Drupal::service('module_installer.uninstall_validators');
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal