function taxonomy_edge_get_tree in Taxonomy Edge 6
Same name and namespace in other branches
- 8 taxonomy_edge.module \taxonomy_edge_get_tree()
- 7.2 taxonomy_edge.module \taxonomy_edge_get_tree()
- 7 taxonomy_edge.module \taxonomy_edge_get_tree()
Reimplementation of taxonomy_get_tree(). Limit db fetch to only specified parent.
See also
1 call to taxonomy_edge_get_tree()
- taxonomy_edge_taxonomy_get_tree in ./
taxonomy_edge.module - BC wrappers after function name changes
File
- ./
taxonomy_edge.module, line 814 - Selecting all children of a given taxonomy term can be a pain. This module makes it easier to do this, by maintaining a complete list of edges for each term using the adjecency matrix graph theory.
Code
function taxonomy_edge_get_tree($vid, $parent = 0, $depth = -1, $max_depth = NULL) {
// @todo Use regular taxonomy_get_tree if realtime build is disabled,
// as this function might be unreliable.
module_load_include('core.inc', 'taxonomy_edge');
// Use optimized version if possible
if (variable_get('taxonomy_edge_optimized_get_tree', TAXONOMY_EDGE_OPTIMIZED_GET_TREE)) {
return taxonomy_edge_get_tree_optimized($vid, $parent, $max_depth);
}
else {
return taxonomy_edge_get_tree_generic($vid, $parent, $max_depth);
}
}