function FilterUninstallValidator::__construct

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

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