locale_test_development_release.module
Same filename in other branches
- 8.9.x core/modules/locale/tests/modules/locale_test_development_release/locale_test_development_release.module
- 10 core/modules/locale/tests/modules/locale_test_development_release/locale_test_development_release.module
- 11.x core/modules/locale/tests/modules/locale_test_development_release/locale_test_development_release.module
Simulate a Drupal version.
File
-
core/
modules/ locale/ tests/ modules/ locale_test_development_release/ locale_test_development_release.module
View source
<?php
/**
* @file
* Simulate a Drupal version.
*/
use Drupal\Core\Extension\Extension;
/**
* Implements hook_system_info_alter().
*
* Change the core version number to a development one for testing.
* 8.0.0-alpha102-dev is the simulated version.
*/
function locale_test_development_release_system_info_alter(&$info, Extension $file, $type) {
if (isset($info['package']) && $info['package'] == 'Core') {
$info['version'] = '8.0.0-alpha102-dev';
}
}
/**
* Implements hook_locale_translation_projects_alter().
*
* Add a contrib module with a dev release to list of translatable modules.
*/
function locale_test_development_release_locale_translation_projects_alter(&$projects) {
$projects['contrib'] = [
'name' => 'contrib',
'info' => [
'name' => 'Contributed module',
'package' => 'Other',
'version' => '12.x-10.4-unstable11+14-dev',
'project' => 'contrib_module',
'datestamp' => '0',
'_info_file_ctime' => 1442933959,
],
'datestamp' => '0',
'project_type' => 'module',
'project_status' => TRUE,
];
}
Functions
Title | Deprecated | Summary |
---|---|---|
locale_test_development_release_locale_translation_projects_alter | Implements hook_locale_translation_projects_alter(). | |
locale_test_development_release_system_info_alter | Implements hook_system_info_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.