You are here

public function FilterUninstallValidator::__construct in Drupal 9

Same name in this branch
  1. 9 core/modules/filter/src/FilterUninstallValidator.php \Drupal\filter\FilterUninstallValidator::__construct()
  2. 9 core/modules/filter/src/ProxyClass/FilterUninstallValidator.php \Drupal\filter\ProxyClass\FilterUninstallValidator::__construct()
Same name and namespace in other branches
  1. 8 core/modules/filter/src/FilterUninstallValidator.php \Drupal\filter\FilterUninstallValidator::__construct()

Constructs a new FilterUninstallValidator.

Parameters

\Drupal\Component\Plugin\PluginManagerInterface $filter_manager: The filter plugin manager.

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

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

File

core/modules/filter/src/FilterUninstallValidator.php, line 42

Class

FilterUninstallValidator
Prevents uninstallation of modules providing used filter plugins.

Namespace

Drupal\filter

Code

public function __construct(PluginManagerInterface $filter_manager, EntityTypeManagerInterface $entity_type_manager, TranslationInterface $string_translation) {
  $this->filterManager = $filter_manager;
  $this->filterStorage = $entity_type_manager
    ->getStorage('filter_format');
  $this->stringTranslation = $string_translation;
}