function book_next

Fetches the menu link for the next page of the book.

Parameters

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

Return value

A fully loaded menu link for the page after the one represented in $book_link.

1 call to book_next()
template_preprocess_book_navigation in modules/book/book.module
Processes variables for book-navigation.tpl.php.

File

modules/book/book.module, line 809

Code

function book_next($book_link) {
    $flat = book_get_flat_menu($book_link);
    reset($flat);
    do {
        $key = key($flat);
        next($flat);
    } while ($key && $key != $book_link['mlid']);
    if ($key == $book_link['mlid']) {
        return current($flat);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.