You are here

function menu_node_exists in Menu Node API 7

Same name and namespace in other branches
  1. 6 menu_node.module \menu_node_exists()

Check to see if a specific mlid exists.

Parameters

$mlid: The menu link id.

Return value

The count of matches (which should be 1 or 0).

1 call to menu_node_exists()
menu_node_record_save in ./menu_node.module
Save records to the {menu_node} table.

File

./menu_node.module, line 346
Menu Node API Manages relationships between the {node} and {menu_links} table.

Code

function menu_node_exists($mlid) {
  return (bool) db_query("SELECT COUNT(mlid) FROM {menu_node} WHERE mlid = :mlid", array(
    ':mlid' => $mlid,
  ))
    ->fetchField();
}