You are here

function _potx_save_version in Translation template extractor 7.2

Same name and namespace in other branches
  1. 8 potx.inc \_potx_save_version()
  2. 5.2 potx.inc \_potx_save_version()
  3. 5 potx.inc \_potx_save_version()
  4. 6.3 potx.inc \_potx_save_version()
  5. 6 potx.inc \_potx_save_version()
  6. 6.2 potx.inc \_potx_save_version()
  7. 7.3 potx.inc \_potx_save_version()
  8. 7 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

$value: The ersion number value of $file. If NULL, the collected values are returned.

$file: Name of file where the version information was found.

5 string references to '_potx_save_version'
PotxTestCase::buildOutput in tests/potx.test
Build the output from parsed files.
PotxTestCase::parseFile in tests/potx.test
Parse the given file with the given API version.
PotxTestCase::testDrupal8ShippedConfiguration in tests/potx.test
Test parsing of Drupal 8 shipped configuration files.
potx_drush_extract in ./potx.drush.inc
Drush command callback.
potx_select_component_form_submit in ./potx.admin.inc
Generate translation template or translation file for the requested component.

File

./potx.inc, line 2557
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;
  }
}