class EntityDeleteMultipleAccessCheck implements AccessInterface (View source)

Checks if the current user has delete access to the items of the tempstore.

Properties

protected EntityTypeManagerInterface $entityTypeManager

The entity type manager.

protected PrivateTempStoreFactory $tempStore

The tempstore service.

protected RequestStack $requestStack

Request stack service.

Methods

__construct(EntityTypeManagerInterface $entity_type_manager, PrivateTempStoreFactory $temp_store_factory, RequestStack $request_stack)

Constructs a new EntityDeleteMultipleAccessCheck.

access(AccountInterface $account, string $entity_type_id)

Checks if the user has delete access for at least one item of the store.

Details

__construct(EntityTypeManagerInterface $entity_type_manager, PrivateTempStoreFactory $temp_store_factory, RequestStack $request_stack)

Constructs a new EntityDeleteMultipleAccessCheck.

Parameters

EntityTypeManagerInterface $entity_type_manager

The entity type manager.

PrivateTempStoreFactory $temp_store_factory

The tempstore service.

RequestStack $request_stack

The request stack service.

AccessResult access(AccountInterface $account, string $entity_type_id)

Checks if the user has delete access for at least one item of the store.

Parameters

AccountInterface $account

Run access checks for this account.

string $entity_type_id

Entity type ID.

Return Value

AccessResult

Allowed or forbidden, neutral if tempstore is empty.