You are here

function entity_menu_links_insert_revision in Entity menu links 7

Inserts a new revision for the given menu_link.

2 calls to entity_menu_links_insert_revision()
entity_menu_links_menu_link_insert in ./entity_menu_links.module
Implements hook_menu_link_insert().
entity_menu_links_menu_link_update in ./entity_menu_links.module
Implements hook_menu_link_update().

File

./entity_menu_links.module, line 157
Entity menu link module

Code

function entity_menu_links_insert_revision($menu_link) {
  $revision = entity_menu_links_create_revision($menu_link);
  if (empty($revision['vuuid'])) {
    $revision['vuuid'] = uuid_generate();
  }
  $vid = db_insert('menu_links_revision')
    ->fields($revision)
    ->execute();
  return $vid;
}