public function DataPolicyModuleInstaller::__construct in Data Policy 8
Same name in this branch
- 8 src/DataPolicyModuleInstaller.php \Drupal\data_policy\DataPolicyModuleInstaller::__construct()
- 8 src/ProxyClass/DataPolicyModuleInstaller.php \Drupal\data_policy\ProxyClass\DataPolicyModuleInstaller::__construct()
Constructs a new DataPolicyModuleInstaller instance.
Parameters
string $root: The app root.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\DrupalKernelInterface $kernel: The drupal kernel.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
Overrides ModuleInstaller::__construct
File
- src/
DataPolicyModuleInstaller.php, line 46
Class
- DataPolicyModuleInstaller
- Class DataPolicyModuleInstaller.
Namespace
Drupal\data_policyCode
public function __construct($root, ModuleHandlerInterface $module_handler, DrupalKernelInterface $kernel, EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory) {
parent::__construct($root, $module_handler, $kernel);
$this->storage = $entity_type_manager
->getStorage('data_policy');
$this->entityId = $config_factory
->get('data_policy.data_policy')
->get('entity_id');
}