You are here

public function LPStatus::getStatus in Opigno Learning path 3.x

Same name and namespace in other branches
  1. 8 src/Entity/LPStatus.php \Drupal\opigno_learning_path\Entity\LPStatus::getStatus()

Gets the training status.

Return value

string|null Training status.

Overrides LPStatusInterface::getStatus

File

src/Entity/LPStatus.php, line 118

Class

LPStatus
Defines the User Learning Path attempt status entity.

Namespace

Drupal\opigno_learning_path\Entity

Code

public function getStatus() {
  $value = $this
    ->get('status')
    ->getValue();
  if (empty($value)) {
    return NULL;
  }
  return $value[0]['value'];
}