function TaxonomyEdgeTreeTestCase::formatTree in Taxonomy Edge 6
Same name and namespace in other branches
- 8 tests/tree.test \TaxonomyEdgeTreeTestCase::formatTree()
- 7 tests/tree.test \TaxonomyEdgeTreeTestCase::formatTree()
3 calls to TaxonomyEdgeTreeTestCase::formatTree()
File
- tests/tree.test, line 313 
Class
- TaxonomyEdgeTreeTestCase
- @file
Code
function formatTree() {
  $vid = $this->vocabulary['vid'];
  global $conf;
  $conf['taxonomy_edge_exclude_root'] = FALSE;
  $conf['taxonomy_edge_static_caching'] = FALSE;
  $tree = taxonomy_edge_get_tree_generic($vid);
  $output = '';
  foreach ($tree as $term) {
    $output .= str_repeat('-', $term->depth);
    $output .= $term->depth ? ' ' : '';
    $output .= $term->name . "\n";
  }
  return $output;
}