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