public function BookNodeIsRemovableAccessCheck::access in Drupal 8
Same name and namespace in other branches
- 9 core/modules/book/src/Access/BookNodeIsRemovableAccessCheck.php \Drupal\book\Access\BookNodeIsRemovableAccessCheck::access()
Checks access for removing the node from its book.
Parameters
\Drupal\node\NodeInterface $node: The node requested to be removed from its book.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
File
- core/
modules/ book/ src/ Access/ BookNodeIsRemovableAccessCheck.php, line 41
Class
- BookNodeIsRemovableAccessCheck
- Determines whether the requested node can be removed from its book.
Namespace
Drupal\book\AccessCode
public function access(NodeInterface $node) {
return AccessResult::allowedIf($this->bookManager
->checkNodeIsRemovable($node))
->addCacheableDependency($node);
}