function _book_node_is_removable

Determines if a node can be removed from the book.

A node can be removed from a book if it is actually in a book and it either is not a top-level page or is a top-level page with no children.

Parameters

$node: The node to remove from the outline.

3 calls to _book_node_is_removable()
book_outline_form in modules/book/book.pages.inc
Form constructor for the book outline form.
book_remove_form_submit in modules/book/book.pages.inc
Form submission handler for book_remove_form().
_book_outline_remove_access in modules/book/book.module
Access callback: Determines if the user can remove nodes from the outline.

File

modules/book/book.module, line 228

Code

function _book_node_is_removable($node) {
    return !empty($node->book['bid']) && ($node->book['bid'] != $node->nid || !$node->book['has_children']);
}

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