You are here

function termstatus_test_term_list in Taxonomy Term Status 7

Page callback: List terms of a given vocabulary.

1 string reference to 'termstatus_test_term_list'
termstatus_test_menu in tests/termstatus_test.module
Implements hook_menu().

File

tests/termstatus_test.module, line 32
Taxonomy term status test stub module.

Code

function termstatus_test_term_list($vocabulary = NULL) {
  $vid = isset($vocabulary->vid) ? $vocabulary->vid : NULL;
  $terms = taxonomy_get_tree($vid);
  $items = array();
  foreach ($terms as $term) {
    $items[] = l($term->name, 'taxonomy/term/' . $term->tid);
  }
  return theme('item_list', array(
    'items' => $items,
  ));
}