You are here

public function GdprTasksSarWorker::processItem in General Data Protection Regulation 7

Process the SARs request.

File

modules/gdpr_tasks/src/Plugin/QueueWorker/GdprTasksSarWorker.php, line 11

Class

GdprTasksSarWorker
Queue worker callback for processing SARs requests.

Code

public function processItem($data) {

  /* @var \GDPRTask $task */
  $task = gdpr_task_load($data);

  // Work out where we are up to and what to do next.
  switch ($task->status) {

    // Received but not initialised.
    case 'requested':
      $this
        ->initialise($task);
      break;

    // Processed by staff and ready to compile.
    case 'processed':
      $this
        ->compile($task);
      break;
  }
}