protected function TeamMemberApiProductAccessHandler::getCache in Apigee Edge 8
Tries to retrieve a previously cached access value from the static cache.
Parameters
\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.
Return value
\Drupal\Core\Access\AccessResultInterface|null The cached AccessResult, or NULL if there is no record for the given API Product, operation, and team and account in the cache.
1 call to TeamMemberApiProductAccessHandler::getCache()
- 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 221
Class
- TeamMemberApiProductAccessHandler
- Default team member API product access handler implementation.
Namespace
Drupal\apigee_edge_teamsCode
protected function getCache(ApiProductInterface $api_product, string $operation, TeamInterface $team, AccountInterface $account) : ?AccessResultInterface {
// Return from cache if a value has been set for it previously.
if (isset($this->accessCache[$team
->id()][$account
->id()][$api_product
->id()][$operation])) {
return $this->accessCache[$team
->id()][$account
->id()][$api_product
->id()][$operation];
}
return NULL;
}