You are here

public function BookNodeIsRemovableAccessCheck::access in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 46
Contains \Drupal\book\Access\BookNodeIsRemovableAccessCheck.

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))
    ->cacheUntilEntityChanges($node);
}