You are here

function _taxonomy_menu_get_menu_items in Taxonomy menu 6.2

Same name and namespace in other branches
  1. 8 taxonomy_menu.database.inc \_taxonomy_menu_get_menu_items()
  2. 7.2 taxonomy_menu.database.inc \_taxonomy_menu_get_menu_items()
  3. 7 taxonomy_menu.database.inc \_taxonomy_menu_get_menu_items()

Retrieve the term / menu relations for a vocab.

Parameters

$vid: vocabulary's id

Return value

array(tid => mlid)

2 calls to _taxonomy_menu_get_menu_items()
_taxonomy_menu_delete_all in ./taxonomy_menu.database.inc
Delete all links associated with this vocab from both the taxonomy_menu table and the menu_link table.
_taxonomy_menu_update_link_items in ./taxonomy_menu.module
Update the menu items

File

./taxonomy_menu.database.inc, line 42
Database functions

Code

function _taxonomy_menu_get_menu_items($vid) {
  $result = db_query('SELECT mlid, tid FROM {taxonomy_menu} WHERE vid = %d', $vid);
  $menu_items = array();
  while ($data = db_fetch_object($result)) {
    $menu_items[$data->tid] = $data->mlid;
  }
  return $menu_items;
}