You are here

function taxonomy_manager_export_get_tree in Taxonomy Manager 6

Same name and namespace in other branches
  1. 5 taxonomy_manager.module \taxonomy_manager_export_get_tree()
  2. 6.2 taxonomy_manager.admin.inc \taxonomy_manager_export_get_tree()
  3. 7 taxonomy_manager.admin.inc \taxonomy_manager_export_get_tree()

Helper for cvs export to get taxonomy tree

1 call to taxonomy_manager_export_get_tree()
taxonomy_manager_export_csv in ./taxonomy_manager.admin.inc
Generates the CVS Ouput

File

./taxonomy_manager.admin.inc, line 1400

Code

function taxonomy_manager_export_get_tree($vid, $selected_tid, $depth, $options) {
  $tree = array();
  if ($options['whole_voc']) {
    $tree = taxonomy_get_tree($vid, 0, -1, $depth);
  }
  else {
    if ($options['children'] && $selected_tid) {
      $tree = taxonomy_get_tree($vid, $selected_tid, -1, $depth);
    }
    else {
      if ($options['root_terms']) {
        $tree = taxonomy_get_tree($vid, 0, -1, 1);
      }
    }
  }
  return $tree;
}