You are here

public static function LPStatus::isCertificateExpireSet in Opigno Learning path 8

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

Gets training certificate expiration flag.

Parameters

\Drupal\group\Entity\Group $group: Group object.

Return value

bool|null True if training certificate expiration set, false|null otherwise.

4 calls to LPStatus::isCertificateExpireSet()
LPStatus::getTrainingStartDate in src/Entity/LPStatus.php
Returns training start date for displaying statistics.
LPStatus::isCertificateExpired in src/Entity/LPStatus.php
Returns flag if training certificate expired for the user.
Progress::getProgressBuildAchievementsPage in src/Progress.php
Get get progress for achievements page.
Progress::getProgressBuildGroupPage in src/Progress.php
Get get progress for group page.

File

src/Entity/LPStatus.php, line 256

Class

LPStatus
Defines the User Learning Path attempt status entity.

Namespace

Drupal\opigno_learning_path\Entity

Code

public static function isCertificateExpireSet(Group $group) {
  $value = $group
    ->get('field_certificate_expire')
    ->getValue();
  if (empty($value)) {
    return NULL;
  }
  return $value[0]['value'];
}