function pmissue_token_values in Drupal PM (Project Management) 8
Same name and namespace in other branches
- 7.3 pmissue/pmissue.module \pmissue_token_values()
- 7.2 pmissue/pmissue.module \pmissue_token_values()
Implements hook_token_values().
File
- pmissue/
pmissue.module, line 122 - 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;
}