function ModuleRequiredByThemesUninstallValidator::__construct

Same name in this branch
  1. 8.9.x core/lib/Drupal/Core/ProxyClass/Extension/ModuleRequiredByThemesUninstallValidator.php \Drupal\Core\ProxyClass\Extension\ModuleRequiredByThemesUninstallValidator::__construct()
Same name in other branches
  1. 9 core/lib/Drupal/Core/ProxyClass/Extension/ModuleRequiredByThemesUninstallValidator.php \Drupal\Core\ProxyClass\Extension\ModuleRequiredByThemesUninstallValidator::__construct()
  2. 9 core/lib/Drupal/Core/Extension/ModuleRequiredByThemesUninstallValidator.php \Drupal\Core\Extension\ModuleRequiredByThemesUninstallValidator::__construct()
  3. 10 core/lib/Drupal/Core/ProxyClass/Extension/ModuleRequiredByThemesUninstallValidator.php \Drupal\Core\ProxyClass\Extension\ModuleRequiredByThemesUninstallValidator::__construct()
  4. 10 core/lib/Drupal/Core/Extension/ModuleRequiredByThemesUninstallValidator.php \Drupal\Core\Extension\ModuleRequiredByThemesUninstallValidator::__construct()
  5. 11.x core/lib/Drupal/Core/ProxyClass/Extension/ModuleRequiredByThemesUninstallValidator.php \Drupal\Core\ProxyClass\Extension\ModuleRequiredByThemesUninstallValidator::__construct()
  6. 11.x 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;
}

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