class EnvironmentVariableRealmController in Environment Indicator 7.2
Realm controller for environment realms.
Hierarchy
- class \EnvironmentVariableRealmController extends \VariableRealmDefaultController
Expanded class hierarchy of EnvironmentVariableRealmController
1 string reference to 'EnvironmentVariableRealmController'
- environment_indicator_variable_variable_realm_info in environment_indicator_variable/
environment_indicator_variable.module - Implements hook_variable_realm_info().
File
- environment_indicator_variable/
class/ EnvironmentVariableRealmController.php, line 11 - Variable Realm controller class definition.
View source
class EnvironmentVariableRealmController extends VariableRealmDefaultController {
/**
* Implementation of VariableRealmControllerInterface::getAvailableVariables().
*/
public function getAvailableVariables() {
$variables = array();
foreach (variable_get_info() as $name => $variable) {
$variables[] = $name;
}
return $variables;
}
/**
* Implementation of VariableRealmControllerInterface::getDefaultKey().
*/
public function getDefaultKey() {
$env = environment_indicator_default_environment_indicator_environment();
$env = reset($env);
return $env->machine;
}
/**
* Implementation of VariableRealmControllerInterface::getRequestKey().
*/
public function getRequestKey() {
$env = environment_indicator_get_active();
return $env['machine'];
}
/**
* Implementation of VariableRealmControllerInterface::getAllKeys().
*/
public function getAllKeys() {
$environment_list = array();
foreach (environment_indicator_get_all() as $machine => $environment) {
$environment_list[$machine] = $environment->name;
}
return $environment_list;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EnvironmentVariableRealmController:: |
public | function | Implementation of VariableRealmControllerInterface::getAllKeys(). | |
EnvironmentVariableRealmController:: |
public | function | Implementation of VariableRealmControllerInterface::getAvailableVariables(). | |
EnvironmentVariableRealmController:: |
public | function | Implementation of VariableRealmControllerInterface::getDefaultKey(). | |
EnvironmentVariableRealmController:: |
public | function | Implementation of VariableRealmControllerInterface::getRequestKey(). |