You are here

function _taxonomy_menu_get_menu_items in Taxonomy menu 8

Same name and namespace in other branches
  1. 6.2 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()

Retrieves all menu items for a vocabulary.

Parameters

$vid: the vocabulary's ID.

Return value

array An associative array of menu link id / taxonomy term id associations.

3 calls to _taxonomy_menu_get_menu_items()
TaxonomyMenuUnitTest::testTaxonomyMenuCRUD in lib/Drupal/taxonomy_menu/Tests/TaxonomyMenuUnitTest.php
Tests CRUD functions.
taxonomy_menu_menu_links_delete in ./taxonomy_menu.module
Deletes all the menu links associated to a vocabulary.
taxonomy_menu_menu_links_update in ./taxonomy_menu.module
Updates menu links associated to a vocabulary.

File

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

Code

function _taxonomy_menu_get_menu_items($vid) {
  $result = db_select('taxonomy_menu', 'tm')
    ->fields('tm', array(
    'mlid',
    'tid',
  ))
    ->condition('vid', $vid)
    ->execute()
    ->fetchAllKeyed();
  return $result;
}