You are here

function course_book_items in Course 7

Same name and namespace in other branches
  1. 8.3 modules/course_book/course_book.module \course_book_items()
  2. 8.2 modules/course_book/course_book.module \course_book_items()
  3. 6 modules/course_book/course_book.module \course_book_items()
  4. 7.2 modules/course_book/course_book.module \course_book_items()
  5. 3.x modules/course_book/course_book.module \course_book_items()

Gets a nested list of book items.

Parameters

int $bid: A book ID.

bool $links: Whether or not to render item links.

array $exclude: (Optional) An array of menu link IDs. Any link whose mlid is in this array will be excluded (along with its children).

int $depth_limit: Any link deeper than this value will be excluded (along with its children).

Return value

array A nested array of book items, suitable for theme_item_list().

1 call to course_book_items()
course_book_override_outline_list_item in modules/course_book/course_book.module
Overrides a course outline list item.

File

modules/course_book/course_book.module, line 202

Code

function course_book_items($bid, $links = TRUE, $exclude = array(), $depth_limit = MENU_MAX_DEPTH) {
  $tree = menu_tree_all_data(book_menu_name($bid));
  $items = course_book_items_recurse($tree, $links, $exclude, $depth_limit);
  return $items;
}