You are here

function workflow_token_list in Workflow 5

Same name and namespace in other branches
  1. 5.2 workflow.module \workflow_token_list()
  2. 6.2 workflow.module \workflow_token_list()
  3. 6 workflow.module \workflow_token_list()

Implementation of hook_token_list()

File

./workflow.module, line 2023

Code

function workflow_token_list($type = 'all') {
  if ($type == 'workflow' || $type == 'node' || $type == 'all') {
    $tokens['workflow']['workflow-name'] = 'Name of workflow appied to this node';
    $tokens['workflow']['workflow-current-state-name'] = 'Current state of content';
    $tokens['workflow']['workflow-old-state-name'] = 'Old state of content';
    $tokens['workflow']['workflow-current-state-date-iso'] = 'Date of last state change (ISO)';
    $tokens['workflow']['workflow-current-state-date-tstamp'] = 'Date of last state change (timestamp)';
    $tokens['workflow']['workflow-current-state-date-formatted'] = 'Date of last state change (formated - M d, Y h:i:s)';
    $tokens['workflow']['workflow-current-state-updating-user-name'] = 'Username of last state changer';
    $tokens['workflow']['workflow-current-state-updating-user-uid'] = 'uid of last state changer';
    $tokens['workflow']['workflow-current-state-updating-user-mail'] = 'email of last state changer';
    $tokens['workflow']['workflow-current-state-log-entry'] = 'Last workflow comment log';
    $tokens['node'] = $tokens['workflow'];
  }
  return $tokens;
}