NodeAccessControlHandler::REVISION_OPERATION_MAP
Same name in other branches
- 9 core/modules/node/src/NodeAccessControlHandler.php \Drupal\node\NodeAccessControlHandler::REVISION_OPERATION_MAP
- 10 core/modules/node/src/NodeAccessControlHandler.php \Drupal\node\NodeAccessControlHandler::REVISION_OPERATION_MAP
Map of revision operations.
Keys contain revision operations, where values are an array containing the permission operation and entity operation.
Permission operation is used to build the required permission, e.g. 'permissionOperation all revisions', 'permissionOperation type revisions'.
Entity operation is used to determine access, e.g for 'delete revision' operation, an account must also have access to 'delete' operation on an entity.
File
-
core/
modules/ node/ src/ NodeAccessControlHandler.php, line 52
Class
- NodeAccessControlHandler
- Defines the access control handler for the node entity type.
Namespace
Drupal\nodeCode
protected const REVISION_OPERATION_MAP = [
'view all revisions' => [
'view',
'view',
],
'view revision' => [
'view',
'view',
],
'revert revision' => [
'revert',
'update',
],
'delete revision' => [
'delete',
'delete',
],
];
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.