You are here

public function GroupPermissionsCacheContext::__construct in Group 8

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

Constructs a new GroupMembershipPermissionsCacheContext class.

Parameters

\Drupal\Core\Session\AccountProxyInterface $current_user: The current user.

\Drupal\group\Access\GroupPermissionsHashGeneratorInterface $hash_generator: The permissions hash generator.

File

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

Class

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

Namespace

Drupal\group\Cache\Context

Code

public function __construct(AccountProxyInterface $current_user, GroupPermissionsHashGeneratorInterface $hash_generator) {
  $this->currentUser = $current_user;
  $this->permissionsHashGenerator = $hash_generator;
}