You are here

function _taxonomy_menu_insert_menu_item in Taxonomy menu 7.2

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

Inserts a taxonomy term/menu item association in {taxonomy_menu} table.

Parameters

$mlid: the menu link's ID.

$tid: the term's ID.

$vid: the vocabulary's ID.

$langcode: (optional) Defaults to LANGUAGE_NONE. The language code associated to the menu link's ID.

1 call to _taxonomy_menu_insert_menu_item()
taxonomy_menu_taxonomy_menu_save in ./taxonomy_menu.module
Implements hook_taxonomy_menu_save().

File

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

Code

function _taxonomy_menu_insert_menu_item($mlid, $tid, $vid, $langcode = LANGUAGE_NONE) {
  $fields = array(
    'mlid' => $mlid,
    'tid' => $tid,
    'vid' => $vid,
    'language' => $langcode,
  );
  db_insert('taxonomy_menu')
    ->fields($fields)
    ->execute();
}