You are here

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

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

Constructs a TaskManager object.

Parameters

\Drupal\Core\Entity\EntityTypeManager $entity_type_manager: The entity type manager.

\Drupal\Core\Session\AccountProxy $current_user: The current user service.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

File

modules/gdpr_tasks/src/TaskManager.php, line 45

Class

TaskManager
Defines a helper class for stuff related to views data.

Namespace

Drupal\gdpr_tasks

Code

public function __construct(EntityTypeManager $entity_type_manager, AccountProxy $current_user) {
  $this->entityTypeManager = $entity_type_manager;
  $this->taskStorage = $entity_type_manager
    ->getStorage('gdpr_task');
  $this->currentUser = $current_user;
}