class EntityViewDisplayAccessControlHandler in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/Entity/Access/EntityViewDisplayAccessControlHandler.php \Drupal\Core\Entity\Entity\Access\EntityViewDisplayAccessControlHandler
- 9 core/lib/Drupal/Core/Entity/Entity/Access/EntityViewDisplayAccessControlHandler.php \Drupal\Core\Entity\Entity\Access\EntityViewDisplayAccessControlHandler
Provides an entity access control handler for displays.
Hierarchy
- class \Drupal\Core\Entity\Entity\Access\EntityViewDisplayAccessControlHandler extends \Drupal\Core\Entity\EntityAccessControlHandler
Expanded class hierarchy of EntityViewDisplayAccessControlHandler
1 file declares its use of EntityViewDisplayAccessControlHandler
- EntityViewDisplayAccessControlHandlerTest.php in core/
tests/ Drupal/ Tests/ Core/ Entity/ Access/ EntityViewDisplayAccessControlHandlerTest.php
File
- core/
lib/ Drupal/ Core/ Entity/ Entity/ Access/ EntityViewDisplayAccessControlHandler.php, line 13
Namespace
Drupal\Core\Entity\Entity\AccessView source
class EntityViewDisplayAccessControlHandler extends EntityAccessControlHandler {
/**
* {@inheritdoc}
*/
protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
/** @var \Drupal\Core\Entity\Display\EntityViewDisplayInterface $entity */
return parent::checkAccess($entity, $operation, $account)
->orIf(AccessResult::allowedIfHasPermission($account, 'administer ' . $entity
->getTargetEntityTypeId() . ' display'));
}
}