public function ForumUninstallValidator::__construct in Zircon Profile 8.0
Same name in this branch
- 8.0 core/modules/forum/src/ForumUninstallValidator.php \Drupal\forum\ForumUninstallValidator::__construct()
- 8.0 core/modules/forum/src/ProxyClass/ForumUninstallValidator.php \Drupal\forum\ProxyClass\ForumUninstallValidator::__construct()
Same name and namespace in other branches
- 8 core/modules/forum/src/ForumUninstallValidator.php \Drupal\forum\ForumUninstallValidator::__construct()
Constructs a new ForumUninstallValidator.
Parameters
\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager.
\Drupal\Core\Entity\Query\QueryFactory $query_factory: The entity query factory.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.
File
- core/
modules/ forum/ src/ ForumUninstallValidator.php, line 59 - Contains \Drupal\forum\ForumUninstallValidator.
Class
- ForumUninstallValidator
- Prevents forum module from being uninstalled whilst any forum nodes exist or there are any terms in the forum vocabulary.
Namespace
Drupal\forumCode
public function __construct(EntityManagerInterface $entity_manager, QueryFactory $query_factory, ConfigFactoryInterface $config_factory, TranslationInterface $string_translation) {
$this->vocabularyStorage = $entity_manager
->getStorage('taxonomy_vocabulary');
$this->queryFactory = $query_factory;
$this->configFactory = $config_factory;
$this->stringTranslation = $string_translation;
}