function backup_migrate_module_version in Backup and Migrate 5.0.x
Track this module's version.
Return value
string A module version string; defaults to '5.0.x-dev'.
2 calls to backup_migrate_module_version()
- backup_migrate_backup_migrate_service_object_alter in ./
backup_migrate.module - Implements hook_backup_migrate_service_object_alter().
- DrupalSiteArchiveSource::getManifestFile in src/
Drupal/ Source/ DrupalSiteArchiveSource.php - Get a file which contains the file.
File
- ./
backup_migrate.module, line 316 - Primary hook implementations for Backup Migrate.
Code
function backup_migrate_module_version() {
static $version;
if (is_null($version)) {
// The default version string for this release of the module.
$version = '5.0.x-dev';
// If the module's version can be identified, use it instead of the default.
$modules = Drupal::service('extension.list.module')
->getAllInstalledInfo();
if (!empty($modules['backup_migrate']['version'])) {
$version = $modules['backup_migrate']['version'];
}
}
return $version;
}