You are here

function example_taxonomy_get_tree in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/tests/old/samples/example.module \example_taxonomy_get_tree()

File

coder_upgrade/tests/old/samples/example.module, line 1091

Code

function example_taxonomy_get_tree() {

  // Do we need to change module_invoke???
  if ($vocabularies) {
    foreach ($vocabularies as $vocabulary) {
      $terms = module_invoke('taxonomy', 'get_tree', $vocabulary->vid, 0, 2);
      $terms = module_invoke('taxonomy', 'get_tree', $vocabulary->vid, 0, 2, NULL);
      $terms = module_invoke('taxonomy', 'get_tree', $vocabulary->vid, 0, 2, $max_depth);
      $terms = module_invoke('taxonomy', 'get_tree', $vocabulary->vid, 0, -1);
      $terms = module_invoke('taxonomy', 'get_tree', $vocabulary->vid, 0, -1, NULL);
      $terms = module_invoke('taxonomy', 'get_tree', $vocabulary->vid, 0, -1, $max_depth);
      $terms = module_invoke('taxonomy', 'get_tree', $vocabulary->vid, 0);
      foreach ($terms as $term) {
        $term_name = $term->name;
        foreach (module_invoke('taxonomy', 'get_parents', $term->tid, 'tid') as $parent) {
        }
      }
    }
  }

  // taxonomy_get_tree() -- Change the next line but leave this alone
  if (!empty($children[$vid][$child])) {
    $tree = array_merge($tree, taxonomy_get_tree($vid, $child, $depth, $max_depth));

    // $tree = array_merge($tree, taxonomy_get_tree($vid, $child, $max_depth, $depth));
  }

  // taxonomy_get_term_data() -- Change the next line but leave this alone
  foreach ($tids as $index => $tid) {
    $term = taxonomy_get_term_data($tid);
    $tree = taxonomy_get_tree($term->vid, $tid, 2);
    $tree = taxonomy_get_tree($term->vid, $tid, 2, NULL);
    $tree = taxonomy_get_tree($term->vid, $tid, 2, $depth);
    $tree = taxonomy_get_tree($term->vid, $tid, -1);
    $tree = taxonomy_get_tree($term->vid, $tid, -1, NULL);
    $tree = taxonomy_get_tree($term->vid, $tid, -1, $depth);
    $tree = taxonomy_get_tree($term->vid, $tid);
  }
}