You are here

protected function EntityAccessControlHandler::checkFieldAccess in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php \Drupal\Core\Entity\EntityAccessControlHandler::checkFieldAccess()
  2. 10 core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php \Drupal\Core\Entity\EntityAccessControlHandler::checkFieldAccess()

Default field access as determined by this access control handler.

Parameters

string $operation: The operation access should be checked for. Usually one of "view" or "edit".

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.

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

\Drupal\Core\Field\FieldItemListInterface $items: (optional) The field values for which to check access, or NULL if access is checked for the field definition, without any specific value available. Defaults to NULL.

Return value

\Drupal\Core\Access\AccessResultInterface The access result.

5 calls to EntityAccessControlHandler::checkFieldAccess()
CommentAccessControlHandler::checkFieldAccess in core/modules/comment/src/CommentAccessControlHandler.php
Default field access as determined by this access control handler.
EntityAccessControlHandler::fieldAccess in core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php
Checks access to an operation on a given entity field.
FileAccessControlHandler::checkFieldAccess in core/modules/file/src/FileAccessControlHandler.php
Default field access as determined by this access control handler.
NodeAccessControlHandler::checkFieldAccess in core/modules/node/src/NodeAccessControlHandler.php
Default field access as determined by this access control handler.
UserAccessControlHandler::checkFieldAccess in core/modules/user/src/UserAccessControlHandler.php
Default field access as determined by this access control handler.
4 methods override EntityAccessControlHandler::checkFieldAccess()
CommentAccessControlHandler::checkFieldAccess in core/modules/comment/src/CommentAccessControlHandler.php
Default field access as determined by this access control handler.
FileAccessControlHandler::checkFieldAccess in core/modules/file/src/FileAccessControlHandler.php
Default field access as determined by this access control handler.
NodeAccessControlHandler::checkFieldAccess in core/modules/node/src/NodeAccessControlHandler.php
Default field access as determined by this access control handler.
UserAccessControlHandler::checkFieldAccess in core/modules/user/src/UserAccessControlHandler.php
Default field access as determined by this access control handler.

File

core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php, line 381

Class

EntityAccessControlHandler
Defines a default implementation for entity access control handler.

Namespace

Drupal\Core\Entity

Code

protected function checkFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) {
  return AccessResult::allowed();
}