function pmticket_token_values in Drupal PM (Project Management) 8
Same name and namespace in other branches
- 7.3 pmticket/pmticket.module \pmticket_token_values()
- 7 pmticket/pmticket.module \pmticket_token_values()
- 7.2 pmticket/pmticket.module \pmticket_token_values()
Implements hook_token_values().
File
- pmticket/
pmticket.module, line 122 - Main module file for the PM Ticket module.
Code
function pmticket_token_values($type, $object = NULL) {
$values = array();
$node = $object;
if (($type == 'node' || $type == 'all') && $node->type === 'pmticket') {
$values['pmticket-organization-nid'] = $node->organization_nid;
$values['pmticket-organization-title'] = $node->organization_title;
$values['pmticket-project-nid'] = $node->project_nid;
$values['pmticket-project-title'] = $node->project_title;
}
return $values;
}