function _book_flatten_menu in Drupal 6
Same name and namespace in other branches
- 7 modules/book/book.module \_book_flatten_menu()
Recursive helper function for book_get_flat_menu().
1 call to _book_flatten_menu()
- book_get_flat_menu in modules/
book/ book.module - Get the book menu tree for a page, and return it as a linear array.
File
- modules/
book/ book.module, line 528 - Allows users to structure the pages of a site in a hierarchy or outline.
Code
function _book_flatten_menu($tree, &$flat) {
foreach ($tree as $data) {
if (!$data['link']['hidden']) {
$flat[$data['link']['mlid']] = $data['link'];
if ($data['below']) {
_book_flatten_menu($data['below'], $flat);
}
}
}
}