function environment_token_list in Environment 7
Same name and namespace in other branches
- 6 plugins/environment.token.inc \environment_token_list()
Implements hook_token_list().
File
- ./
environment.module, line 338 - Module for handling changes in server environments
Code
function environment_token_list($type = 'all') {
$tokens = array();
if ($type == 'all' || $type == 'global') {
foreach (environment_load_workflow() as $name => $workflow) {
$tokens['global']['environment_' . $name] = t('The current environment state for @title workflow.', array(
'@title' => $workflow['label'],
));
$tokens['global']['environment_' . $name . '-label'] = t('The human-readable version of the current environment state for @title workflow.', array(
'@title' => $workflow['label'],
));
}
}
return $tokens;
}