You are here

function _taxonomy_menu_get_menu_items in Taxonomy menu 7

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

Retrieves the term / menu relations for a vocab.

Parameters

$vid: Vocabulary ID.

Return value

array Relations to menu link ID as an array keyed by taxonomy term ID. array(tid => mlid)

2 calls to _taxonomy_menu_get_menu_items()
_taxonomy_menu_delete_all in ./taxonomy_menu.database.inc
Deletes 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
Updates the menu items.

File

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

Code

function _taxonomy_menu_get_menu_items($vid) {
  return db_query('SELECT tid, mlid FROM {taxonomy_menu} WHERE vid = :vid', array(
    ':vid' => $vid,
  ))
    ->fetchAllKeyed();
}