You are here

function pmtask_token_list in Drupal PM (Project Management) 7

Implements hook_token_list().

File

pmtask/pmtask.module, line 743

Code

function pmtask_token_list($type = 'all') {
  $tokens = array();
  if ($type == 'node' || $type == 'all') {
    $tokens['node']['pmtask-step-no'] = t('Project Management Task: Step No.');
    $tokens['node']['pmtask-organization-nid'] = t('Project Management Task: Organization Node ID.');
    $tokens['node']['pmtask-organization-title'] = t('Project Management Task: Organization Title.');
    $tokens['node']['pmtask-project-nid'] = t('Project Management Task: Project Node ID.');
    $tokens['node']['pmtask-project-title'] = t('Project Management Task: Project Title.');
    $tokens['node']['pmtask-parent-nid'] = t('Project Management Task: Parent NID.');
    $tokens['node']['pmtask-taskstatus'] = t('Project Management Task: Project Status.');
    $tokens['node']['pmtask-taskcategory'] = t('Project Management Task: Task Category.');
    $tokens['node']['pmtask-taskpriority'] = t('Project Management Task: Task Priority.');
    $tokens['node']['pmtask-durationunit'] = t('Project Management Task: Task Duration Unit.');
    $tokens['node']['pmtask-duration'] = t('Project Management Task: Task Duration.');
    $tokens['node']['pmtask-price'] = t('Project Management Task: Task Price.');
    $tokens['node']['pmtask-pricemode'] = t('Project Management Task: Task Price Mode.');
    if (module_exists('pmperson')) {

      // Assignee(s)
      $tokens['node']['pmtask-assigned-to-email'] = t('Project Management Task: Task Assignee(s) Email Address(s).');
      $tokens['node']['pmtask-assigned-title'] = t('Project Management Task: Task Assignee(s) Title(s).');
    }
  }
  return $tokens;
}