function _potx_schema_reverse_lookup in Translation template extractor 8
Same name and namespace in other branches
- 7.3 potx.local.inc \_potx_schema_reverse_lookup()
Find the module containing the schema for a specific config file.
Parameters
array $matching_candidates: The list of matching candidates for a config file, ordered from specific to generic.
Return value
string|null The module containing the matching schema, if exists, otherwise NULL.
See also
1 string reference to '_potx_schema_reverse_lookup'
- potx_local_init in ./
potx.local.inc - Initialize potx to run locally, e.g. by drush.
File
- ./
potx.local.inc, line 153 - Hook implementations for this module.
Code
function _potx_schema_reverse_lookup(array $matching_candidates) {
global $_potx_schema_lookup;
global $_potx_reverse_lookup_built;
if (!$_potx_reverse_lookup_built) {
_potx_build_reverse_lookup();
}
foreach ($matching_candidates as $candidate) {
if (isset($_potx_schema_lookup[$candidate])) {
return $_potx_schema_lookup[$candidate];
}
}
return NULL;
}