You are here

public function Task::getStatusLabel in General Data Protection Regulation 8

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

Gets the current human readable status of the task.

Return value

string The human readable status of the Task entity.

Overrides TaskInterface::getStatusLabel

File

modules/gdpr_tasks/src/Entity/Task.php, line 161

Class

Task
Defines the Task entity.

Namespace

Drupal\gdpr_tasks\Entity

Code

public function getStatusLabel() {
  $statuses = $this
    ->getStatuses();
  $value = $this
    ->getStatus();
  if (isset($statuses[$value])) {
    $value = $statuses[$value];
  }
  return $value;
}