function book_link_load
book_link_load($mlid)
Gets a book menu link by its menu link ID.
Like menu_link_load(), but adds additional data from the {book} table.
Do not call when loading a node, since this function may call node_load().
Parameters
$mlid: The menu link ID of the menu item.
Return value
A menu link, with the link translated for rendering and data added from the {book} table. FALSE if there is an error.
File
- modules/book/book.module, line 1356
- Allows users to create and organize related content in an outline.
Code
function book_link_load($mlid) { if ($item = db_query("SELECT * FROM {menu_links} ml INNER JOIN {book} b ON b.mlid = ml.mlid LEFT JOIN {menu_router} m ON m.path = ml.router_path WHERE ml.mlid = :mlid", array( ':mlid' => $mlid, ))->fetchAssoc()) { _menu_link_translate($item); return $item; } return FALSE; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!book!book.module/function/book_link_load/7.x