function RequiredModuleUninstallValidator::__construct

Same name in this branch
  1. 10 core/lib/Drupal/Core/ProxyClass/Extension/RequiredModuleUninstallValidator.php \Drupal\Core\ProxyClass\Extension\RequiredModuleUninstallValidator::__construct()
Same name in other branches
  1. 9 core/lib/Drupal/Core/ProxyClass/Extension/RequiredModuleUninstallValidator.php \Drupal\Core\ProxyClass\Extension\RequiredModuleUninstallValidator::__construct()
  2. 9 core/lib/Drupal/Core/Extension/RequiredModuleUninstallValidator.php \Drupal\Core\Extension\RequiredModuleUninstallValidator::__construct()
  3. 8.9.x core/lib/Drupal/Core/ProxyClass/Extension/RequiredModuleUninstallValidator.php \Drupal\Core\ProxyClass\Extension\RequiredModuleUninstallValidator::__construct()
  4. 8.9.x core/lib/Drupal/Core/Extension/RequiredModuleUninstallValidator.php \Drupal\Core\Extension\RequiredModuleUninstallValidator::__construct()
  5. 11.x core/lib/Drupal/Core/ProxyClass/Extension/RequiredModuleUninstallValidator.php \Drupal\Core\ProxyClass\Extension\RequiredModuleUninstallValidator::__construct()
  6. 11.x core/lib/Drupal/Core/Extension/RequiredModuleUninstallValidator.php \Drupal\Core\Extension\RequiredModuleUninstallValidator::__construct()

Constructs a new RequiredModuleUninstallValidator.

Parameters

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

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

File

core/lib/Drupal/Core/Extension/RequiredModuleUninstallValidator.php, line 30

Class

RequiredModuleUninstallValidator
Ensures that required modules cannot be uninstalled.

Namespace

Drupal\Core\Extension

Code

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

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