function ModulesUninstallConfirmForm::__construct

Same name in other branches
  1. 9 core/modules/system/src/Form/ModulesUninstallConfirmForm.php \Drupal\system\Form\ModulesUninstallConfirmForm::__construct()
  2. 8.9.x core/modules/system/src/Form/ModulesUninstallConfirmForm.php \Drupal\system\Form\ModulesUninstallConfirmForm::__construct()
  3. 10 core/modules/system/src/Form/ModulesUninstallConfirmForm.php \Drupal\system\Form\ModulesUninstallConfirmForm::__construct()

Constructs a ModulesUninstallConfirmForm object.

Parameters

\Drupal\Core\Extension\ModuleInstallerInterface $module_installer: The module installer.

\Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $key_value_expirable: The key value expirable factory.

\Drupal\Core\Config\ConfigManagerInterface $config_manager: The configuration manager.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Extension\ModuleExtensionList $extension_list_module: The module extension list.

string|false|null $installProfile: The install profile.

File

core/modules/system/src/Form/ModulesUninstallConfirmForm.php, line 82

Class

ModulesUninstallConfirmForm
Builds a confirmation form to uninstall selected modules.

Namespace

Drupal\system\Form

Code

public function __construct(ModuleInstallerInterface $module_installer, KeyValueStoreExpirableInterface $key_value_expirable, ConfigManagerInterface $config_manager, EntityTypeManagerInterface $entity_type_manager, ModuleExtensionList $extension_list_module, string|false|null $installProfile = NULL) {
    $this->moduleInstaller = $module_installer;
    $this->keyValueExpirable = $key_value_expirable;
    $this->configManager = $config_manager;
    $this->entityTypeManager = $entity_type_manager;
    $this->moduleExtensionList = $extension_list_module;
    $this->installProfile ??= \Drupal::installProfile();
}

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