You are here

function variable_realm_delete_variable in Variable 7

Delete variable for all keys on realm.

Parameters

$realm_name: Realm name to delete.

$variable_name: Variable name to delete.

2 calls to variable_realm_delete_variable()
variable_realm_select_variables_form_submit in variable_realm/variable_realm.form.inc
Select variables for realm.
variable_realm_variable_delete in variable_realm/variable_realm.module
Implements hook_variable_delete().

File

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

Code

function variable_realm_delete_variable($realm_name, $variable_name, $rebuild = TRUE) {
  foreach (array_keys(variable_realm_keys($realm_name)) as $key) {
    variable_realm_del($realm_name, $key, $variable_name, FALSE);
  }
  if ($rebuild) {
    variable_realm_rebuild();
  }
}