You are here

public function BookNodeIsRemovableAccessCheck::access in Drupal 9

Same name and namespace in other branches
  1. 8 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\Access

Code

public function access(NodeInterface $node) {
  return AccessResult::allowedIf($this->bookManager
    ->checkNodeIsRemovable($node))
    ->addCacheableDependency($node);
}