final class RelationshipRouteAccessCheck implements AccessInterface (View source)

internal  JSON:API maintains no PHP API. The API is the HTTP API. This class may change at any time and could break any dependencies on it.
 

Defines a class to check access to related and relationship routes.

Constants

ROUTE_REQUIREMENT_KEY

The route requirement key for this access check.

Properties

protected EntityAccessChecker $entityAccessChecker

The JSON:API entity access checker.

Methods

__construct(EntityAccessChecker $entity_access_checker)

RelationshipRouteAccessCheck constructor.

access(Route $route, RouteMatchInterface $route_match, AccountInterface $account = NULL)

Checks access to the relationship field on the given route.

Details

__construct(EntityAccessChecker $entity_access_checker)

RelationshipRouteAccessCheck constructor.

Parameters

EntityAccessChecker $entity_access_checker

The JSON:API entity access checker.

AccessResultInterface access(Route $route, RouteMatchInterface $route_match, AccountInterface $account = NULL)

Checks access to the relationship field on the given route.

Parameters

Route $route

The route to check against.

RouteMatchInterface $route_match

The route match.

AccountInterface $account

The currently logged in account.

Return Value

AccessResultInterface

The access result.