You are here

public static function RightToBeForgottenEntityTraversal::create in General Data Protection Regulation 3.0.x

Same name and namespace in other branches
  1. 8.2 modules/gdpr_tasks/src/Traversal/RightToBeForgottenEntityTraversal.php \Drupal\gdpr_tasks\Traversal\RightToBeForgottenEntityTraversal::create()
  2. 8 modules/gdpr_tasks/src/Traversal/RightToBeForgottenEntityTraversal.php \Drupal\gdpr_tasks\Traversal\RightToBeForgottenEntityTraversal::create()

Creates an instance of the traversal for this specific entity.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this instance should use.

\Drupal\Core\Entity\EntityInterface $base_entity: The entity to be traversed.

Overrides EntityTraversal::create

File

modules/gdpr_tasks/src/Traversal/RightToBeForgottenEntityTraversal.php, line 43

Class

RightToBeForgottenEntityTraversal
Entity traversal used for Right to be Forgotten requests.

Namespace

Drupal\gdpr_tasks\Traversal

Code

public static function create(ContainerInterface $container, EntityInterface $base_entity) {
  return new static($container
    ->get('entity_type.manager'), $container
    ->get('entity_field.manager'), $base_entity, $container
    ->get('module_handler'), $container
    ->get('anonymizer.anonymizer_factory'));
}