You are here

protected function TeamMemberApiProductAccessHandler::setCache in Apigee Edge 8

Statically caches whether the given user has access.

Parameters

\Drupal\Core\Access\AccessResultInterface $access: The access result.

\Drupal\apigee_edge\Entity\ApiProductInterface $api_product: The API Product entity for which to check access.

string $operation: The entity operation. Usually one of 'view', 'update', 'create', 'delete' or 'assign".

\Drupal\apigee_edge_teams\Entity\TeamInterface $team: The team for which to check access.

\Drupal\Core\Session\AccountInterface $account: The team member for which to check access.

1 call to TeamMemberApiProductAccessHandler::setCache()
TeamMemberApiProductAccessHandler::access in modules/apigee_edge_teams/src/TeamMemberApiProductAccessHandler.php
Checks access to an operation on a given API product.

File

modules/apigee_edge_teams/src/TeamMemberApiProductAccessHandler.php, line 245

Class

TeamMemberApiProductAccessHandler
Default team member API product access handler implementation.

Namespace

Drupal\apigee_edge_teams

Code

protected function setCache(AccessResultInterface $access, ApiProductInterface $api_product, string $operation, TeamInterface $team, AccountInterface $account) : void {

  // Save the given value in the static cache and directly return it.
  $this->accessCache[$team
    ->id()][$account
    ->id()][$api_product
    ->id()][$operation] = $access;
}