EntityAccessCheck
class EntityAccessCheck implements AccessInterface (View source)
Provides a generic access checker for entities.
Methods
access(Route $route, RouteMatchInterface $route_match, AccountInterface $account)
Checks access to the entity operation on the given route.
Details
AccessResultInterface
access(Route $route, RouteMatchInterface $route_match, AccountInterface $account)
Checks access to the entity operation on the given route.
The route's '_entity_access' requirement must follow the pattern 'entity_stub_name.operation', where available operations are: 'view', 'update', 'create', and 'delete'.
For example, this route configuration invokes a permissions check for 'update' access to entities of type 'node':