You are here

public function GroupPermissionsCacheContext::getContext in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Cache/Context/GroupPermissionsCacheContext.php \Drupal\group\Cache\Context\GroupPermissionsCacheContext::getContext()

Returns the string representation of the cache context.

A cache context service's name is used as a token (placeholder) cache key, and is then replaced with the string returned by this method.

Return value

string The string representation of the cache context.

Overrides CacheContextInterface::getContext

File

src/Cache/Context/GroupPermissionsCacheContext.php, line 56

Class

GroupPermissionsCacheContext
Defines a cache context for "per group membership permissions" caching.

Namespace

Drupal\group\Cache\Context

Code

public function getContext() {

  // @todo Take bypass permission into account, delete permission in 8.2.x.
  return $this->permissionsHashGenerator
    ->generateHash($this->currentUser);
}