You are here

public function BookManager::checkNodeIsRemovable in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/book/src/BookManager.php \Drupal\book\BookManager::checkNodeIsRemovable()
  2. 9 core/modules/book/src/BookManager.php \Drupal\book\BookManager::checkNodeIsRemovable()

File

core/modules/book/src/BookManager.php, line 297

Class

BookManager
Defines a book manager.

Namespace

Drupal\book

Code

public function checkNodeIsRemovable(NodeInterface $node) {
  return !empty($node->book['bid']) && ($node->book['bid'] != $node
    ->id() || !$node->book['has_children']);
}