function _taxonomy_menu_insert_menu_item in Taxonomy menu 8
Same name and namespace in other branches
- 6.2 taxonomy_menu.database.inc \_taxonomy_menu_insert_menu_item()
- 7.2 taxonomy_menu.database.inc \_taxonomy_menu_insert_menu_item()
- 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::LANGCODE_NOT_SPECIFIED. 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 23 - Database functions.
Code
function _taxonomy_menu_insert_menu_item($mlid, $tid, $vid, $langcode = Language::LANGCODE_NOT_SPECIFIED) {
$fields = array(
'mlid' => $mlid,
'tid' => $tid,
'vid' => $vid,
'language' => $langcode,
);
db_insert('taxonomy_menu')
->fields($fields)
->execute();
}