public static function LPStatus::getCertificateExpireTimestamp in Opigno Learning path 8
Same name and namespace in other branches
- 3.x src/Entity/LPStatus.php \Drupal\opigno_learning_path\Entity\LPStatus::getCertificateExpireTimestamp()
Returns training certificate expire timestamp.
Parameters
int $gid: Group ID.
int $uid: User ID.
Return value
int|null Timestamp if found, null otherwise.
4 calls to LPStatus::getCertificateExpireTimestamp()
- LPStatus::getCertificateExpirationMessage in src/Entity/ LPStatus.php 
- Returns training certificate expiration message.
- LPStatus::getTrainingStartDate in src/Entity/ LPStatus.php 
- Returns training start date for displaying statistics.
- 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 322 
Class
- LPStatus
- Defines the User Learning Path attempt status entity.
Namespace
Drupal\opigno_learning_path\EntityCode
public static function getCertificateExpireTimestamp($gid, $uid) {
  $db_connection = \Drupal::service('database');
  $result = $db_connection
    ->select('user_lp_status_expire', 'lps')
    ->fields('lps', [
    'expire',
  ])
    ->condition('gid', $gid)
    ->condition('uid', $uid)
    ->execute()
    ->fetchField();
  if ($result) {
    return $result;
  }
  return NULL;
}