function opigno_lms_get_current_opigno_lms_release in Opigno LMS 8
Same name and namespace in other branches
- 8.2 opigno_lms.profile \opigno_lms_get_current_opigno_lms_release()
- 3.x opigno_lms.profile \opigno_lms_get_current_opigno_lms_release()
Implements opigno_lms_get_current_opigno_lms_release().
Get current Opigno LMS release version.
Return string with current release version or FALSE.
1 call to opigno_lms_get_current_opigno_lms_release()
File
- ./
opigno_lms.profile, line 90 - Enables modules and site configuration for a opigno_lms site installation.
Code
function opigno_lms_get_current_opigno_lms_release() {
$profile = \Drupal::installProfile();
if ($profile != 'opigno_lms') {
return FALSE;
}
$info = system_get_info('module', $profile);
if (!empty($info) && isset($info['version'])) {
if (!isset($info['version'])) {
\Drupal::logger('opigno_learning_path')
->notice(t('Opigno LMS version is undefined!'));
return FALSE;
}
else {
return $info['version'];
}
}
return FALSE;
}