function NodeGrantDatabaseStorageInterface::access

Same name in other branches
  1. 9 core/modules/node/src/NodeGrantDatabaseStorageInterface.php \Drupal\node\NodeGrantDatabaseStorageInterface::access()
  2. 8.9.x core/modules/node/src/NodeGrantDatabaseStorageInterface.php \Drupal\node\NodeGrantDatabaseStorageInterface::access()
  3. 10 core/modules/node/src/NodeGrantDatabaseStorageInterface.php \Drupal\node\NodeGrantDatabaseStorageInterface::access()

Determines access to nodes based on node grants.

Parameters

\Drupal\node\NodeInterface $node: The entity for which to check 'create' access.

string $operation: The entity operation. Usually one of 'view', 'edit', 'create' or 'delete'.

\Drupal\Core\Session\AccountInterface $account: The user for which to check access.

Return value

\Drupal\Core\Access\AccessResultInterface The access result, either allowed or neutral. If there are no node grants, the default grant defined by writeDefault() is applied.

See also

hook_node_grants()

hook_node_access_records()

\Drupal\node\NodeGrantDatabaseStorageInterface::writeDefault()

File

core/modules/node/src/NodeGrantDatabaseStorageInterface.php, line 108

Class

NodeGrantDatabaseStorageInterface
Provides an interface for node access grant storage.

Namespace

Drupal\node

Code

public function access(NodeInterface $node, $operation, AccountInterface $account);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.