function taxonomy_menu_build_tree in Taxonomy menu 6.3
Helper Function to build the tree array from tids
Parameters
$tids array():
Return value
tree array
1 call to taxonomy_menu_build_tree()
- taxonomy_menu_term_set_form_submit in ./
taxonomy_menu.admin.inc - Submit handler for taxonomy_term_set_form
File
- ./
taxonomy_menu.admin.inc, line 620 - admin section for taxonomy menu
Code
function taxonomy_menu_build_tree($vid, $tids, $tsid) {
$tree = taxonomy_get_tree($vid);
foreach ($tree as $key => $term) {
// Check to see if the the term is in the tids array
if (!in_array($term->tid, $tids)) {
unset($tree[$key]);
}
else {
$tree[$key]->parent = $tsid . ':' . $term->parents[0];
unset($tree[$key]->parents);
$tree[$key]->tsid = $tsid;
}
}
return $tree;
}