function BookNodeIsRemovableAccessCheck::access
Same name in other branches
- 8.9.x core/modules/book/src/Access/BookNodeIsRemovableAccessCheck.php \Drupal\book\Access\BookNodeIsRemovableAccessCheck::access()
- 10 core/modules/book/src/Access/BookNodeIsRemovableAccessCheck.php \Drupal\book\Access\BookNodeIsRemovableAccessCheck::access()
- 11.x 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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.