function variable_realm_union_build_key in Variable 7
Constructs a combined key by concatenating given values separated by a colon. Before the key is generated, the $values array is sorted alphabetically by the array keys.
Parameters
$realm: The variable realm (union).
$values: The individual realm values in form of [name => value].
2 calls to variable_realm_union_build_key()
- _variable_realm_union_find_key in variable_realm_union/
variable_realm_union.module - Find key for union realm based on other realm keys.
- _variable_realm_union_realm_keys in variable_realm_union/
variable_realm_union.variable.inc - Produce keys for union realm.
File
- variable_realm_union/
variable_realm_union.module, line 46 - Drupal Module - Variable Realm Union.
Code
function variable_realm_union_build_key($realm, $values) {
// Make sure values are in correct order
ksort($values);
// implode values
return implode(':', $values);
}