You are here

function workflow_token_list in Workflow 6

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

Implementation of hook_token_list().

File

./workflow.module, line 1207
Support workflows made up of arbitrary states.

Code

function workflow_token_list($type = 'all') {
  $tokens = array();
  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 (site default)';
    $tokens['workflow']['workflow-current-state-date-small'] = 'Date of last state change (small format)';
    $tokens['workflow']['workflow-current-state-date-medium'] = 'Date of last state change (medium format)';
    $tokens['workflow']['workflow-current-state-date-large'] = 'Date of last state change (large format)';
    $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;
}