book_get_flat_menu

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 book_get_flat_menu($book_link)

Get the book menu tree for a page, and return it as a linear array.

Übergabeparameter

$book_link A fully loaded menu link that is part of the book hierarchy.

Rückgabewert

A linear array of menu links in the order that the links are shown in the menu, so the previous and next pages are the elements before and after the element corresponding to $node. The children of $node (if any) will come immediately after it in the array.

▾ 3 functions call book_get_flat_menu()

book_children in modules/book/book.module
Format the menu links for the child pages of the current page.
book_next in modules/book/book.module
Fetches the menu link for the next page of the book.
book_prev in modules/book/book.module
Fetches the menu link for the previous page of the book.

Code

modules/book/book.module, line 514

<?php
function book_get_flat_menu($book_link) {
  static $flat = array();

  if (!isset($flat[$book_link['mlid']])) {
    // Call menu_tree_all_data() to take advantage of the menu system's caching.
    $tree = menu_tree_all_data($book_link['menu_name'], $book_link);
    $flat[$book_link['mlid']] = array();
    _book_flatten_menu($tree, $flat[$book_link['mlid']]);
  }
  return $flat[$book_link['mlid']];
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen