You are here

function taxonomy_manager_tree_term_extra_info in Taxonomy Manager 6.2

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

returns some additional information about the term which gets added to the link title

4 calls to taxonomy_manager_tree_term_extra_info()
taxonomy_manager_form_submit in ./taxonomy_manager.admin.inc
submits the taxonomy manager form (only search button)
taxonomy_manager_tree_build_form in ./taxonomy_manager.module
recursive function for building nested form array with checkboxes and weight forms for each term
_taxonomy_manager_form_term_data_lists in ./taxonomy_manager.admin.inc
helper function for generating tables with values and delete op and field for adding
_taxonomy_manager_form_term_data_translations in ./taxonomy_manager.admin.inc
helper function for generating a table listing the translations

File

./taxonomy_manager.module, line 756
Taxonomy Manager

Code

function taxonomy_manager_tree_term_extra_info($term) {
  $extra_info = "";
  $term_children_count = _taxonomy_manager_tree_term_children_count($term->tid);
  $term_parents = taxonomy_get_parents($term->tid);
  if ($term_children_count > 0) {
    $extra_info = t('Children Count: ') . $term_children_count;
  }
  if (count($term_parents) >= 1) {
    $extra_info .= !empty($extra_info) ? ' | ' : '';
    $extra_info .= t('Direct Parents: ');
    $p_names = array();
    foreach ($term_parents as $p) {
      if ($p->tid != $term->tid) {
        $p_names[] = $p->name;
      }
    }
    $extra_info .= implode(', ', $p_names);
  }
  return $extra_info;
}