You are here

function _taxonomy_manager_tree_term_children_count in Taxonomy Manager 6.2

Same name and namespace in other branches
  1. 6 taxonomy_manager.module \_taxonomy_manager_tree_term_children_count()
  2. 7 taxonomy_manager.module \_taxonomy_manager_tree_term_children_count()

Parameters

$tid:

Return value

children count

3 calls to _taxonomy_manager_tree_term_children_count()
taxonomy_manager_taxonomy_manager_tree_operations in ./taxonomy_manager.module
function gets called by the taxonomy_manager_tree form type ('taxonomy_manager_'. form_id .'_operations') return an form array with values to show next to every term value
taxonomy_manager_tree_term_extra_info in ./taxonomy_manager.module
returns some additional information about the term which gets added to the link title
_taxonomy_manager_tree_term_get_class in ./taxonomy_manager.module
calculates class type (expandable, lastExpandable) for current element

File

./taxonomy_manager.module, line 743
Taxonomy Manager

Code

function _taxonomy_manager_tree_term_children_count($tid) {
  static $tids = array();
  if (!isset($tids[$tid])) {
    $tids[$tid] = db_result(db_query("SELECT COUNT(tid) FROM {term_hierarchy} WHERE parent = %d", $tid));
  }
  return $tids[$tid];
}