You are here

public function EntityDeleteMultipleAccessCheck::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityDeleteMultipleAccessCheck.php \Drupal\Core\Entity\EntityDeleteMultipleAccessCheck::__construct()
  2. 9 core/lib/Drupal/Core/Entity/EntityDeleteMultipleAccessCheck.php \Drupal\Core\Entity\EntityDeleteMultipleAccessCheck::__construct()

Constructs a new EntityDeleteMultipleAccessCheck.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory: The tempstore service.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack service.

File

core/lib/Drupal/Core/Entity/EntityDeleteMultipleAccessCheck.php, line 47

Class

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

Namespace

Drupal\Core\Entity

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, PrivateTempStoreFactory $temp_store_factory, RequestStack $request_stack) {
  $this->entityTypeManager = $entity_type_manager;
  $this->tempStore = $temp_store_factory
    ->get('entity_delete_multiple_confirm');
  $this->requestStack = $request_stack;
}