class EntityCreateAccessCheck implements AccessInterface (View source)

Defines an access checker for entity creation.

Properties

protected EntityTypeManagerInterface $entityTypeManager

The entity type manager service.

protected string $requirementsKey

The key used by the routing requirement.

Methods

__construct(EntityTypeManagerInterface $entity_type_manager)

Constructs an EntityCreateAccessCheck object.

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

Checks access to create the entity type and bundle for the given route.

Details

__construct(EntityTypeManagerInterface $entity_type_manager)

Constructs an EntityCreateAccessCheck object.

Parameters

EntityTypeManagerInterface $entity_type_manager

The entity type manager service.

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

Checks access to create the entity type and bundle for the given route.

Parameters

Route $route

The route to check against.

RouteMatchInterface $route_match

The parametrized route.

AccountInterface $account

The currently logged in account.

Return Value

AccessResultInterface

The access result.