function _book_parent_depth_limit

Finds the depth limit for items in the parent select.

Parameters

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

Return value

The depth limit for items in the parent select.

2 calls to _book_parent_depth_limit()
book_node_prepare in modules/book/book.module
Implements hook_node_prepare().
book_outline_form in modules/book/book.pages.inc
Form constructor for the book outline form.

File

modules/book/book.module, line 1029

Code

function _book_parent_depth_limit($book_link) {
    return MENU_MAX_DEPTH - 1 - ($book_link['mlid'] && $book_link['has_children'] ? menu_link_children_relative_depth($book_link) : 0);
}

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