You are here

function variable_realm_form_key_current in Variable 7.2

Same name and namespace in other branches
  1. 7 variable_realm/variable_realm.form.inc \variable_realm_form_key_current()

Get current realm key from query string or from current realm value.

2 calls to variable_realm_form_key_current()
variable_admin_realm_edit in variable_admin/variable_admin.inc
Edit variables for realm.
_variable_realm_variable_settings_form_switcher in variable_realm/variable_realm.form.inc
Add realm switcher to the form.

File

variable_realm/variable_realm.form.inc, line 188
Administrative forms for variable realms.

Code

function variable_realm_form_key_current($realm_name) {
  $realm_controller = variable_realm_controller($realm_name);
  if ($key = variable_realm_params($realm_name)) {
    return $key;
  }
  elseif ($key = $realm_controller
    ->getKey()) {
    return $key;
  }
  elseif ($key = $realm_controller
    ->getRequestKey()) {
    return $key;
  }
  else {
    return $realm_controller
      ->getDefaultKey();
  }
}