You are here

public function ModuleRequiredByThemesUninstallValidator::__construct in Drupal 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/Extension/ModuleRequiredByThemesUninstallValidator.php \Drupal\Core\Extension\ModuleRequiredByThemesUninstallValidator::__construct()
  2. 8 core/lib/Drupal/Core/ProxyClass/Extension/ModuleRequiredByThemesUninstallValidator.php \Drupal\Core\ProxyClass\Extension\ModuleRequiredByThemesUninstallValidator::__construct()
Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Extension/ModuleRequiredByThemesUninstallValidator.php \Drupal\Core\Extension\ModuleRequiredByThemesUninstallValidator::__construct()
  2. 10 core/lib/Drupal/Core/Extension/ModuleRequiredByThemesUninstallValidator.php \Drupal\Core\Extension\ModuleRequiredByThemesUninstallValidator::__construct()

Constructs a new ModuleRequiredByThemesUninstallValidator.

Parameters

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.

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

\Drupal\Core\Extension\ThemeExtensionList $extension_list_theme: The theme extension list.

File

core/lib/Drupal/Core/Extension/ModuleRequiredByThemesUninstallValidator.php, line 39

Class

ModuleRequiredByThemesUninstallValidator
Ensures modules cannot be uninstalled if enabled themes depend on them.

Namespace

Drupal\Core\Extension

Code

public function __construct(TranslationInterface $string_translation, ModuleExtensionList $extension_list_module, ThemeExtensionList $extension_list_theme) {
  $this->stringTranslation = $string_translation;
  $this->moduleExtensionList = $extension_list_module;
  $this->themeExtensionList = $extension_list_theme;
}