You are here

public function EntityTraversal::__construct in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 modules/gdpr_fields/src/EntityTraversal.php \Drupal\gdpr_fields\EntityTraversal::__construct()
  2. 3.0.x modules/gdpr_fields/src/EntityTraversal.php \Drupal\gdpr_fields\EntityTraversal::__construct()

EntityTraversal constructor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.

\Drupal\Core\Entity\EntityFieldManagerInterface $entityFieldManager: The entity field manager.

\Drupal\Core\Entity\EntityInterface $base_entity: The starting entity for the traversal.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

1 call to EntityTraversal::__construct()
RightToBeForgottenEntityTraversal::__construct in modules/gdpr_tasks/src/Traversal/RightToBeForgottenEntityTraversal.php
EntityTraversal constructor.
1 method overrides EntityTraversal::__construct()
RightToBeForgottenEntityTraversal::__construct in modules/gdpr_tasks/src/Traversal/RightToBeForgottenEntityTraversal.php
EntityTraversal constructor.

File

modules/gdpr_fields/src/EntityTraversal.php, line 88

Class

EntityTraversal
Base class for traversing entities.

Namespace

Drupal\gdpr_fields

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, EntityFieldManagerInterface $entityFieldManager, EntityInterface $base_entity) {
  $this->entityTypeManager = $entityTypeManager;
  $this->entityFieldManager = $entityFieldManager;
  $this->configStorage = $this->entityTypeManager
    ->getStorage('gdpr_fields_config');
  $this->baseEntity = $base_entity;
}