function hook_variable_realm_controller in Variable 7
Provides information about controller classes and weights for variable realms.
Modules implementing this hook must also implement any bootstrap hook (for example hook_boot).
This information is used to dynamically load realms upon request and to build exportable realms as Features. For this reason this must be defined in the main module and available at bootstrap time when the realm is going to be used.
Return value
array Associative array keyed by realm name. Each element is an array containing:
- 'class', Class name implementing RealmControllerInterface.
- 'weight', Default weight for this realm.
See also
i18n_variable_variable_realm_controller()
1 function implements hook_variable_realm_controller()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- variable_realm_variable_realm_controller in variable_realm/
variable_realm.module - Implements hook_variable_realm_controller().
1 invocation of hook_variable_realm_controller()
- variable_realm_controller in variable_realm/
variable_realm.module - Get class and weight information for variable realm.
File
- variable_realm/
variable_realm.api.php, line 30 - Documents hooks provided by Variable Realm API.
Code
function hook_variable_realm_controller() {
$realm['language'] = array(
'weight' => 100,
'class' => 'VariableStoreRealmController',
);
return $realm;
}