Chris@0: bookManager = $book_manager; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Checks access for removing the node from its book. Chris@0: * Chris@0: * @param \Drupal\node\NodeInterface $node Chris@0: * The node requested to be removed from its book. Chris@0: * Chris@0: * @return \Drupal\Core\Access\AccessResultInterface Chris@0: * The access result. Chris@0: */ Chris@0: public function access(NodeInterface $node) { Chris@0: return AccessResult::allowedIf($this->bookManager->checkNodeIsRemovable($node))->addCacheableDependency($node); Chris@0: } Chris@0: Chris@0: }