function _taxonomy_list_list_children in Taxonomy List 6.2
Same name and namespace in other branches
- 5.2 taxonomy_list.module \_taxonomy_list_list_children()
- 7 taxonomy_list.module \_taxonomy_list_list_children()
1 call to _taxonomy_list_list_children()
- theme_taxonomy_list_list in ./
taxonomy_list.module - Theme a list of the term tree.
File
- ./
taxonomy_list.module, line 587 - List all terms in a vocabulary.
Code
function _taxonomy_list_list_children($kids, $tree) {
$items = array();
$odd_even = array(
'even',
'odd',
);
$i = 0;
foreach ($kids as $tid) {
$term = $tree[$tid];
++$i;
$item = array(
'data' => theme('taxonomy_list_term', $term),
'class' => $odd_even[$i & 1],
);
if ($term->children) {
$item['children'] = _taxonomy_list_list_children($term->children, $tree);
}
$items[] = $item;
}
return $items;
}