You are here

function taxonomy_edge_get_top_tid in Taxonomy Edge 7

Same name and namespace in other branches
  1. 8 taxonomy_edge.module \taxonomy_edge_get_top_tid()
  2. 6 taxonomy_edge.module \taxonomy_edge_get_top_tid()
  3. 7.2 taxonomy_edge.module \taxonomy_edge_get_top_tid()

Get top term id.

Parameters

integer $tid: Term ID to get top term ID from.

Return value

integer Top term ID.

1 call to taxonomy_edge_get_top_tid()
TaxonomyEdgeTreeTestCase::testParents in tests/tree.test

File

./taxonomy_edge.module, line 858
Optimization of taxonomy data model for SQL performance.

Code

function taxonomy_edge_get_top_tid($tid) {
  $tids = taxonomy_edge_get_top_tids(array(
    $tid,
  ));
  return reset($tids);
}