function BookManager::checkNodeIsRemovable

Same name in other branches
  1. 9 core/modules/book/src/BookManager.php \Drupal\book\BookManager::checkNodeIsRemovable()
  2. 10 core/modules/book/src/ProxyClass/BookManager.php \Drupal\book\ProxyClass\BookManager::checkNodeIsRemovable()
  3. 10 core/modules/book/src/BookManager.php \Drupal\book\BookManager::checkNodeIsRemovable()
  4. 11.x core/modules/book/src/ProxyClass/BookManager.php \Drupal\book\ProxyClass\BookManager::checkNodeIsRemovable()
  5. 11.x core/modules/book/src/BookManager.php \Drupal\book\BookManager::checkNodeIsRemovable()

Overrides BookManagerInterface::checkNodeIsRemovable

File

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

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']);
}

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