function TaxonomyEdgeTreeTestCase::formatTree in Taxonomy Edge 8
Same name and namespace in other branches
- 6 tests/tree.test \TaxonomyEdgeTreeTestCase::formatTree()
- 7 tests/tree.test \TaxonomyEdgeTreeTestCase::formatTree()
3 calls to TaxonomyEdgeTreeTestCase::formatTree()
File
- tests/
tree.test, line 312
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;
}