public function MerciBundleUninstallValidator::__construct in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2
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
- src/
MerciBundleUninstallValidator.php, line 59 - Contains \Drupal\merci\MerciBundleUninstallValidator.
Class
- MerciBundleUninstallValidator
- Prevents forum module from being uninstalled whilst any forum nodes exist or there are any terms in the forum vocabulary.
Namespace
Drupal\merciCode
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;
}