class EntityCreateAnyAccessCheck implements AccessInterface (View source)

Defines an access checker for creating an entity of any bundle.

Properties

protected EntityTypeManagerInterface $entityTypeManager

The entity type manager.

protected EntityTypeBundleInfoInterface $entityTypeBundleInfo

The entity type bundle info.

protected string $requirementsKey

The key used by the routing requirement.

Methods

__construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info)

Constructs an EntityCreateAnyAccessCheck object.

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

Checks access to create an entity of any bundle for the given route.

Details

__construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info)

Constructs an EntityCreateAnyAccessCheck object.

Parameters

EntityTypeManagerInterface $entity_type_manager

The entity type manager.

EntityTypeBundleInfoInterface $entity_type_bundle_info

The entity type bundle info.

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

Checks access to create an entity of any bundle for the given route.

Parameters

Route $route

The route to check against.

RouteMatchInterface $route_match

The parameterized route.

AccountInterface $account

The currently logged in account.

Return Value

AccessResultInterface

The access result.