diff --git a/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php index 7bf6994..2d4d803 100644 --- a/core/lib/Drupal/Core/Extension/ModuleInstaller.php +++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php @@ -11,6 +11,12 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\DrupalKernelInterface; +/** + * Default implementation of the module installer. + * + * It registers the module in config, install its own configuration, + * installs the schema, updates the Drupal kernel and more. + */ class ModuleInstaller implements ModuleInstallerInterface { /** @@ -112,7 +118,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) { // different from the configured list of enabled modules. For all active // modules not contained in the configured enabled modules, we assume a // weight of 0. - $current_module_filenames = $this->getModuleList(); + $current_module_filenames = $this->moduleHandler->getModuleList(); $current_modules = array_fill_keys(array_keys($current_module_filenames), 0); $current_modules = module_config_sort(array_merge($current_modules, $extension_config->get('module'))); $module_filenames = array(); diff --git a/core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php b/core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php index 869a2a8..7ab9377 100644 --- a/core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php +++ b/core/lib/Drupal/Core/Extension/ModuleInstallerInterface.php @@ -7,6 +7,9 @@ namespace Drupal\Core\Extension; +/** + * Provides the installation of modules with creating the db schema and more. + */ interface ModuleInstallerInterface { /** diff --git a/core/modules/system/src/Form/ModulesUninstallConfirmForm.php b/core/modules/system/src/Form/ModulesUninstallConfirmForm.php index 2e5c60e..dccdad8 100644 --- a/core/modules/system/src/Form/ModulesUninstallConfirmForm.php +++ b/core/modules/system/src/Form/ModulesUninstallConfirmForm.php @@ -9,6 +9,7 @@ use Drupal\Core\Config\ConfigManagerInterface; use Drupal\Core\Entity\EntityManagerInterface; +use Drupal\Core\Extension\ModuleInstallerInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; @@ -69,7 +70,7 @@ class ModulesUninstallConfirmForm extends ConfirmFormBase { * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. */ - public function __construct(ModuleHandlerInterface $module_installer, KeyValueStoreExpirableInterface $key_value_expirable, ConfigManagerInterface $config_manager, EntityManagerInterface $entity_manager) { + public function __construct(ModuleInstallerInterface $module_installer, KeyValueStoreExpirableInterface $key_value_expirable, ConfigManagerInterface $config_manager, EntityManagerInterface $entity_manager) { $this->moduleInstaller = $module_installer; $this->keyValueExpirable = $key_value_expirable; $this->configManager = $config_manager;