You are here

function variable_realm_refresh in Variable 7.2

Refresh variable value.

2 calls to variable_realm_refresh()
variable_realm_del in variable_realm/variable_realm.module
Delete variable from realm
variable_realm_set in variable_realm/variable_realm.module
Set value for realm variable.

File

variable_realm/variable_realm.module, line 280
Variable API module - Realms

Code

function variable_realm_refresh($realm_name, $realm_key, $variable_name) {
  $value = NULL;

  // Only update value if this is the current realm.
  if (variable_realm_status($realm_name) === $realm_key) {
    foreach (variable_realm_current() as $realm_controller) {
      $value = $realm_controller
        ->getCurrentStore()
        ->variable_get($variable_name, $value);
    }
  }
  if (isset($value)) {
    $GLOBALS['conf'][$variable_name] = $value;
  }
  else {
    unset($GLOBALS['conf'][$variable_name]);
  }
}