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