You are here

function TaxonomyEdgeTreeTestCase::formatTree in Taxonomy Edge 7

Same name and namespace in other branches
  1. 8 tests/tree.test \TaxonomyEdgeTreeTestCase::formatTree()
  2. 6 tests/tree.test \TaxonomyEdgeTreeTestCase::formatTree()
3 calls to TaxonomyEdgeTreeTestCase::formatTree()
TaxonomyEdgeTreeTestCase::testInit in tests/tree.test
TaxonomyEdgeTreeTestCase::testTerm in tests/tree.test
TaxonomyEdgeTreeTestCase::testTree in tests/tree.test

File

tests/tree.test, line 359
Web test cases for Taxonomy Edge.

Class

TaxonomyEdgeTreeTestCase
@file Web test cases for Taxonomy Edge.

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;
}