You are here

function pmproject_token_list in Drupal PM (Project Management) 7

Same name and namespace in other branches
  1. 8 pmproject/pmproject.module \pmproject_token_list()
  2. 7.3 pmproject/pmproject.module \pmproject_token_list()
  3. 7.2 pmproject/pmproject.module \pmproject_token_list()

Implements hook_token_list().

File

pmproject/pmproject.module, line 601

Code

function pmproject_token_list($type = 'all') {
  $tokens = array();
  if ($type == 'node' || $type == 'all') {
    $tokens['node']['pmproject-projectstatus'] = t('Project Management Project: Project Status.');
    $tokens['node']['pmproject-projectcategory'] = t('Project Management Project: Project Category.');
    $tokens['node']['pmproject-projectpriority'] = t('Project Management Project: Project Priority.');
    $tokens['node']['pmproject-durationunit'] = t('Project Management Project: Project Duration Unit.');
    $tokens['node']['pmproject-duration'] = t('Project Management Project: Project Duration.');
    $tokens['node']['pmproject-price'] = t('Project Management Project: Project Price.');
    $tokens['node']['pmproject-pricemode'] = t('Project Management Project: Project Price Mode.');
    if (module_exists('pmorganization')) {
      $tokens['node']['pmproject-organization-nid'] = t('Project Management Project: Organization Node ID.');
      $tokens['node']['pmproject-organization-title'] = t('Project Management Project: Organization Title.');
    }
    if (module_exists('pmperson')) {

      // Project Manager
      $tokens['node']['pmproject-manager-title'] = t('Project Management Project: Project Manager Title.');
      $tokens['node']['pmproject-manager-uid'] = t('Project Management Project: Project Manager User ID.');
      $tokens['node']['pmproject-manager-name'] = t('Project Management Project: Project Manager Name.');
      $tokens['node']['pmproject-manager-fullname'] = t('Project Management Project: Project Manager Full Name.');
      $tokens['node']['pmproject-manager-email'] = t('Project Management Project: Project Manager Email Address.');

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