function variable_realm_current in Variable 7
Same name and namespace in other branches
- 7.2 variable_realm/variable_realm.module \variable_realm_current()
Get current realm values ordered by weights.
Return value
array Ordered array of name => value pairs, only realms that are set.
2 calls to variable_realm_current()
- variable_realm_build in variable_realm/
variable_realm.module - Build current realm.
- variable_realm_union_variable_realm_switch in variable_realm_union/
variable_realm_union.module - Implements hook_variable_realm_switch().
File
- variable_realm/
variable_realm.module, line 323 - Variable API module - Realms
Code
function variable_realm_current() {
$realms = variable_realm_weight();
$current = array_combine($realms, $realms);
// Filter the result so we don't return unset realms
return array_filter(array_map('variable_realm_status', $current));
}