You are here

public function ILTResult::getStatusString in Opigno Instructor-led Trainings 3.x

Same name and namespace in other branches
  1. 8 src/Entity/ILTResult.php \Drupal\opigno_ilt\Entity\ILTResult::getStatusString()

Returns the user status as string.

Return value

string|null The user status, or NULL in case the user status field has not been set on the entity.

Overrides ILTResultInterface::getStatusString

File

src/Entity/ILTResult.php, line 116

Class

ILTResult
Defines the ILT Result entity.

Namespace

Drupal\opigno_ilt\Entity

Code

public function getStatusString() {
  return $this
    ->get('status')->value == 1 ? t('Attended') : t('Absent');
}