You are here

function taxonomy_menu_group_list in Taxonomy menu 6.3

page callback for admin/build/taxonomy_menu @TODO Turn this into a theme function

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

File

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

Code

function taxonomy_menu_group_list() {

  //get a list of the menu groups
  $groups = taxonomy_menu_get_menu_groups();

  //cycle through the menu groups and build the display
  foreach ($groups as $group) {

    //add row for the group
    $rows[] = array(
      '<strong>Menu Group:</strong>  ' . check_plain($group->name),
      l(t('Edit'), TAXONOMY_MENU_BASE_PATH . 'group/' . $group->mgid . '/edit'),
      l(t('Rebuild'), TAXONOMY_MENU_BASE_PATH . 'group/' . $group->mgid . '/rebuild'),
      l(t('Delete'), TAXONOMY_MENU_BASE_PATH . 'group/' . $group->mgid . '/delete'),
    );

    //cycle through the menu group items and display
    $term_sets = taxonomy_menu_get_term_sets_by_group($group->mgid);
    taxonomy_menu_term_set_table($term_sets, $rows);

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