NodeGrantDatabaseStorageInterface::access

public NodeGrantDatabaseStorageInterface::access(NodeInterface $node, $operation, AccountInterface $account)

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);
doc_Drupal
2016-10-29 09:30:50
Comments
Leave a Comment

Please login to continue.