function variable_realm_get_variable_list in Variable 7
Get list of variable names that may be set for this realm.
5 calls to variable_realm_get_variable_list()
- variable_realm_admin_realm_info in variable_realm_admin/
variable_realm_admin.pages.inc - Lists available realms.
- variable_realm_edit_variables_form in variable_realm/
variable_realm.form.inc - Edit variables for realm.
- variable_realm_select_variables_form in variable_realm/
variable_realm.form.inc - Select variables for realm.
- variable_realm_select_variables_form_submit in variable_realm/
variable_realm.form.inc - Select variables for realm.
- _variable_realm_variable_settings_form_list in variable_realm/
variable_realm.form.inc - Get variable list for settings forms handling multiple realms.
1 string reference to 'variable_realm_get_variable_list'
- _variable_realm_union_variable_list in variable_realm_union/
variable_realm_union.variable.inc - Produce keys for union realm.
File
- variable_realm/
variable_realm.module, line 130 - Variable API module - Realms
Code
function variable_realm_get_variable_list($realm_name) {
$info = variable_realm_info($realm_name);
if (!empty($info['list callback'])) {
$function = $info['list callback'];
return $function($realm_name, $info);
}
elseif (!empty($info['select'])) {
return variable_get('variable_realm_list_' . $realm_name, array());
}
else {
// If the variable is not set it will default to all variables
return variable_realm_get_variable_options($realm_name);
}
}