function _document_get_node_terms in Document 6
Same name and namespace in other branches
- 7 document.module \_document_get_node_terms()
- 8.x document.module \_document_get_node_terms()
2 calls to _document_get_node_terms()
- document_insert in ./
document.module - Implementation of hook_insert().
- document_update in ./
document.module - Implementation of hook_update().
File
- ./
document.module, line 596
Code
function _document_get_node_terms($node) {
$term_ids = $node->taxonomy[document_get_vocid()];
if (empty($term_ids)) {
return '';
}
else {
$types = document_get_types(TRUE);
if (!is_array($term_ids)) {
$term_ids = explode(',', $term_ids);
}
$terms = array();
foreach ($term_ids as $id) {
$terms[] = $types[$id];
}
return implode($terms);
}
}