function taxonomy_csv_term_get_field_names in Taxonomy CSV import/export 7.4
Return an array of all names of a term reference field of a given term ID.
Parameters
$term_tid: Term object or term id from which to get names. Use of object is quicker.
$field_name: Term reference field to get.
Return value
Result array of items.
1 call to taxonomy_csv_term_get_field_names()
- taxonomy_csv_term_get_relations_names in ./
taxonomy_csv.term.api.inc - Return an array of all related term names of a given term id or object. Wrapper of taxonomy_csv_term_get_field_names.
File
- ./
taxonomy_csv.term.api.inc, line 217 - Find, get and set full or detail term items.
Code
function taxonomy_csv_term_get_field_names($term_tid, $field_name) {
$items = array();
$values = taxonomy_csv_term_get_field_values($term_tid, $field_name);
foreach ($values as $tid) {
$term = taxonomy_term_load($tid);
$items[] = $term->name;
}
return $items;
}