function environment_token_values in Environment 7
Same name and namespace in other branches
- 6 plugins/environment.token.inc \environment_token_values()
Implements hook_token_values().
File
- ./
environment.module, line 352 - Module for handling changes in server environments
Code
function environment_token_values($type, $object = NULL, $options = array()) {
$values = array();
if ($type == 'global') {
foreach (environment_load_workflow() as $name => $workflow) {
$state = environment_current($name, NULL, TRUE);
$values['environment_' . $name] = $state['name'];
$values['environment_' . $name . '-label'] = $state['label'];
}
}
return $values;
}