public function DataPolicyRevisionEdit::__construct in Data Policy 8
Constructs a DataPolicyRevisionEdit object.
Parameters
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity manager.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle service.
\Drupal\Component\Datetime\TimeInterface $time: The time service.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Symfony\Component\HttpFoundation\Request $request: The current request.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
Overrides ContentEntityForm::__construct
File
- src/
Form/ DataPolicyRevisionEdit.php, line 61
Class
- DataPolicyRevisionEdit
- Provides a form for editing a Data policy revision.
Namespace
Drupal\data_policy\FormCode
public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory, Request $request, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($entity_repository, $entity_type_bundle_info, $time);
$this->moduleHandler = $module_handler;
$this->configFactory = $config_factory;
$this->request = $request;
$this->revisionId = $this->request
->get('data_policy_revision');
$this->entityTypeManager = $entity_type_manager;
$this->entity = $this->entityTypeManager
->getStorage('data_policy');
}