NodeGrantDatabaseStorageInterface
interface NodeGrantDatabaseStorageInterface (View source)
Provides an interface for node access grant storage.
Methods
Alters a query when node access is required.
Writes a list of grants to the database, deleting previously saved ones.
Deletes all node access entries.
Creates the default node access grant entry.
Determines access to nodes based on node grants.
Counts available node grants.
Remove the access records belonging to certain nodes.
Details
int
checkAll(AccountInterface $account)
Checks all grants for a given account.
int
alterQuery(mixed $query, array $tables, string $op, AccountInterface $account, string $base_table)
Alters a query when node access is required.
write(NodeInterface $node, array $grants, string $realm = NULL, bool $delete = TRUE)
Writes a list of grants to the database, deleting previously saved ones.
If a realm is provided, it will only delete grants from that realm, but it will always delete a grant from the 'all' realm. Modules that use node access can use this method when doing mass updates due to widespread permission changes.
Note: Don't call this method directly from a contributed module. Call \Drupal\node\NodeAccessControlHandlerInterface::acquireGrants() instead.
delete()
Deletes all node access entries.
writeDefault()
Creates the default node access grant entry.
AccessResultInterface
access(NodeInterface $node, string $operation, AccountInterface $account)
Determines access to nodes based on node grants.
int
count()
Counts available node grants.
deleteNodeRecords(array $nids)
Remove the access records belonging to certain nodes.