You are here

function variable_example_page_realm in Variable 7.2

Same name and namespace in other branches
  1. 7 variable_example/variable_example.module \variable_example_page_realm()

Variable example realm page.

Will switch to given realm and display variables.

1 string reference to 'variable_example_page_realm'
variable_example_menu in variable_example/variable_example.module
Implements hook_menu().

File

variable_example/variable_example.module, line 72

Code

function variable_example_page_realm($realm, $key) {

  // Initialize realm from variable store.
  $variables = variable_store($realm, $key);

  // Set at least one variable for the realm
  $variables += array(
    'site_name' => 'Variable example realm',
  );
  variable_realm_add($realm, $key, $variables);
  variable_realm_switch($realm, $key);
  return variable_example_page_list();
}