You are here

function _taxonomy_term_depth_get_nocache in Taxonomy Term Depth 8.2

Same name and namespace in other branches
  1. 8 taxonomy_term_depth.module \_taxonomy_term_depth_get_nocache()
  2. 7 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()
taxonomy_term_depth_entity_update in ./taxonomy_term_depth.module
Implements hook_entity_update();
taxonomy_term_depth_get_by_tid in ./taxonomy_term_depth.module
@todo: Provide description

File

./taxonomy_term_depth.module, line 87
Main module file.

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);
  }
}