function EntityAccessChecker::__construct

Same name in other branches
  1. 8.9.x core/modules/jsonapi/src/Access/EntityAccessChecker.php \Drupal\jsonapi\Access\EntityAccessChecker::__construct()
  2. 10 core/modules/jsonapi/src/Access/EntityAccessChecker.php \Drupal\jsonapi\Access\EntityAccessChecker::__construct()
  3. 11.x core/modules/jsonapi/src/Access/EntityAccessChecker.php \Drupal\jsonapi\Access\EntityAccessChecker::__construct()

EntityAccessChecker constructor.

Parameters

\Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface $resource_type_repository: The JSON:API resource type repository.

\Symfony\Component\Routing\RouterInterface $router: The router.

\Drupal\Core\Session\AccountInterface $account: The current user.

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.

File

core/modules/jsonapi/src/Access/EntityAccessChecker.php, line 86

Class

EntityAccessChecker
Checks access to entities.

Namespace

Drupal\jsonapi\Access

Code

public function __construct(ResourceTypeRepositoryInterface $resource_type_repository, RouterInterface $router, AccountInterface $account, EntityRepositoryInterface $entity_repository) {
    $this->resourceTypeRepository = $resource_type_repository;
    $this->router = $router;
    $this->currentUser = $account;
    $this->entityRepository = $entity_repository;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.