function variable_realm_union_variable_realm_switch in Variable 7
Implements hook_variable_realm_switch().
File
- variable_realm_union/
variable_realm_union.module, line 64 - Drupal Module - Variable Realm Union.
Code
function variable_realm_union_variable_realm_switch($realm, $key) {
// Current realm values
$current_realms = variable_realm_current();
foreach (variable_realm_union() as $realm_name => $union_realms) {
if ($realm_key = _variable_realm_union_find_key($realm_name, $union_realms, $current_realms)) {
variable_realm_switch($realm_name, $realm_key);
}
else {
variable_realm_switch($realm_name, FALSE);
}
}
}