You are here

function taxonomy_menu_term_set_table in Taxonomy menu 6.3

Formats the list of Term Sets for a given Menu Group

Parameters

object $term_sets:

1 call to taxonomy_menu_term_set_table()
taxonomy_menu_group_list in ./taxonomy_menu.admin.inc
page callback for admin/build/taxonomy_menu @TODO Turn this into a theme function

File

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

Code

function taxonomy_menu_term_set_table($term_sets, &$rows) {
  if ($term_sets) {
    foreach ($term_sets as $term_set) {
      $term_set_path = $term_set->mgid . '/' . $term_set->tsid;
      $rows[] = array(
        '-Term Set: ' . 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'),
      );
    }

    //Add 'add term set' row

    //$rows[] = array(l(t('Add a Term Set'), TAXONOMY_MENU_BASE_PATH .'termset/add'));
  }
  else {
    $rows[] = array(
      l(t('No Term Sets.  Edit the menu group associate a Term Set'), TAXONOMY_MENU_BASE_PATH . 'gropu/' . $term_set->mgid . '/edit'),
    );
  }
}