public static function LPStatus::getCertificateExpirationPeriod in Opigno Learning path 8
Same name and namespace in other branches
- 3.x src/Entity/LPStatus.php \Drupal\opigno_learning_path\Entity\LPStatus::getCertificateExpirationPeriod()
Gets training certificate expiration period.
Parameters
\Drupal\group\Entity\Group $group: Group object.
Return value
int|null Training certificate expiration period.
File
- src/
Entity/ LPStatus.php, line 275
Class
- LPStatus
- Defines the User Learning Path attempt status entity.
Namespace
Drupal\opigno_learning_path\EntityCode
public static function getCertificateExpirationPeriod(Group $group) {
$value = $group
->get('field_certificate_expire_results')
->getValue();
if (empty($value)) {
return NULL;
}
return (int) $value[0]['value'];
}