You are here

function pmticket_token_list in Drupal PM (Project Management) 7

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

Implements hook_token_list().

File

pmticket/pmticket.module, line 689
1: Hooks 2: Access functions

Code

function pmticket_token_list($type = 'all') {
  $tokens = array();
  if ($type == 'node' || $type == 'all') {
    $tokens['node']['pmticket-organization-nid'] = t('Project Management Ticket: Organization Node ID.');
    $tokens['node']['pmticket-organization-title'] = t('Project Management Ticket: Organization Title.');
    $tokens['node']['pmticket-project-nid'] = t('Project Management Ticket: Project Node ID.');
    $tokens['node']['pmticket-project-title'] = t('Project Management Ticket: Project Title.');
    $tokens['node']['pmticket-ticketstatus'] = t('Project Management Ticket: Project Status.');
    $tokens['node']['pmticket-ticketcategory'] = t('Project Management Ticket: Ticket Category.');
    $tokens['node']['pmticket-ticketpriority'] = t('Project Management Ticket: Ticket Priority.');
    $tokens['node']['pmticket-durationunit'] = t('Project Management Ticket: Ticket Duration Unit.');
    $tokens['node']['pmticket-duration'] = t('Project Management Ticket: Ticket Duration.');
    $tokens['node']['pmticket-price'] = t('Project Management Ticket: Ticket Price.');
    $tokens['node']['pmticket-pricemode'] = t('Project Management Ticket: Ticket Price Mode.');
    if (module_exists('pmperson')) {

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