function _taxonomy_term_depth_get_nocache in Taxonomy Term Depth 7
Same name and namespace in other branches
- 8.2 taxonomy_term_depth.module \_taxonomy_term_depth_get_nocache()
- 8 taxonomy_term_depth.module \_taxonomy_term_depth_get_nocache()
Calculates taxonomy term depth from database
Parameters
$tid:
Return value
int
2 calls to _taxonomy_term_depth_get_nocache()
- DynamicDepthCalculationTest::_testDepthCache in ./
taxonomy_term_depth.test - taxonomy_term_depth_get_by_tid in ./
taxonomy_term_depth.module - @todo: Provide description
File
- ./
taxonomy_term_depth.module, line 86 - Provides some custom functionality.
Code
function _taxonomy_term_depth_get_nocache($tid) {
$parent = taxonomy_term_depth_get_parent($tid);
if (!$parent) {
return 1;
}
else {
return 1 + _taxonomy_term_depth_get_nocache($parent);
}
}