function taxonomy_edge_get_top_tid in Taxonomy Edge 6
Same name and namespace in other branches
- 8 taxonomy_edge.module \taxonomy_edge_get_top_tid()
- 7.2 taxonomy_edge.module \taxonomy_edge_get_top_tid()
- 7 taxonomy_edge.module \taxonomy_edge_get_top_tid()
Get top term id.
Parameters
$tid: Term ID to get top term ID from.
Return value
int Top term ID.
1 call to taxonomy_edge_get_top_tid()
File
- ./
taxonomy_edge.module, line 789 - 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_top_tid($tid) {
$tids = taxonomy_edge_get_top_tids(array(
$tid,
));
return reset($tids);
}