function _potx_save_version in Translation template extractor 8
Same name and namespace in other branches
- 5.2 potx.inc \_potx_save_version()
- 5 potx.inc \_potx_save_version()
- 6.3 potx.inc \_potx_save_version()
- 6 potx.inc \_potx_save_version()
- 6.2 potx.inc \_potx_save_version()
- 7.3 potx.inc \_potx_save_version()
- 7 potx.inc \_potx_save_version()
- 7.2 potx.inc \_potx_save_version()
Default $version_callback used by the potx system.
Saves values to a global array to reduce memory consumption problems when passing around big chunks of values.
Parameters
string $value: The version number value of $file. If NULL, the collected values are returned.
string $file: Name of file where the version information was found.
7 string references to '_potx_save_version'
- PotxCommands::potx in src/
Commands/ PotxCommands.php - Extract translatable strings from Drupal source code.
- PotxExtractTranslationForm::submitForm in src/
Form/ PotxExtractTranslationForm.php - Form submission handler.
- PotxTest::buildOutput in tests/
src/ Kernel/ PotxTest.php - Build the output from parsed files.
- PotxTest::parseFile in tests/
src/ Kernel/ PotxTest.php - Parse the given file with the given API version.
- PotxTest::parsePhpContent in tests/
src/ Kernel/ PotxTest.php - Parse the given file with the given API version.
File
- ./
potx.inc, line 3280 - Extraction API used by the web and command line interface.
Code
function _potx_save_version($value = NULL, $file = NULL) {
global $_potx_versions;
if (isset($value)) {
$_potx_versions[$file] = $value;
}
else {
return $_potx_versions;
}
}