You are here

function taxonomy_menu_term_sets in Taxonomy menu 6.3

Callback for List of Term Sets

Return value

@TODO Turn this into a theme function

1 string reference to 'taxonomy_menu_term_sets'
taxonomy_menu_menu in ./taxonomy_menu.module
Implementation of hook_menu().

File

./taxonomy_menu.admin.inc, line 72
admin section for taxonomy menu

Code

function taxonomy_menu_term_sets() {

  //get a list of the menu groups
  $term_sets = taxonomy_menu_get_term_sets();
  if ($term_sets) {

    //cycle through the menu groups and build the display
    $rows = array();
    foreach ($term_sets as $term_set) {

      //add row for the group
      $rows[] = array(
        '<strong>Term Set:</strong>  ' . check_plain($term_set->name),
        l(t('Edit'), TAXONOMY_MENU_BASE_PATH . 'termset/' . $term_set->tsid . '/edit'),
        l(t('Delete'), TAXONOMY_MENU_BASE_PATH . 'termset/' . $term_set->tsid . '/delete'),
      );

      //cycle through the menu group items and display
      $menu_groups = taxonomy_menu_get_menu_group_by_ts($term_set->tsid);
      taxonomy_menu_group_table($menu_groups, $rows);

      //add an empty line
      $rows[] = array();
    }
  }
  else {
    return t('No Term Sets');
  }
  return theme('table', array(), $rows);
}