function book_toc in Drupal 6
Same name and namespace in other branches
- 4 modules/book.module \book_toc()
- 5 modules/book/book.module \book_toc()
- 7 modules/book/book.module \book_toc()
Returns an array of book pages in table of contents order.
Parameters
$bid: The ID of the book whose pages are to be listed.
$exclude: Optional array of mlid values. Any link whose mlid is in this array will be excluded (along with its children).
$depth_limit: Any link deeper than this value will be excluded (along with its children).
Return value
An array of mlid, title pairs for use as options for selecting a book page.
1 call to book_toc()
- _book_parent_select in modules/
book/ book.module - Build the parent selection form element for the node form or outline tab
File
- modules/
book/ book.module, line 862 - Allows users to structure the pages of a site in a hierarchy or outline.
Code
function book_toc($bid, $exclude = array(), $depth_limit) {
$tree = menu_tree_all_data(book_menu_name($bid));
$toc = array();
_book_toc_recurse($tree, '', $toc, $exclude, $depth_limit);
return $toc;
}