You are here

public function OgRoleCacheContext::__construct in Organic groups 8

Constructs a new UserCacheContextBase class.

Parameters

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

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.

\Drupal\og\MembershipManagerInterface $membershipManager: The membership manager service.

\Drupal\Core\Database\Connection $database: The active database connection.

\Drupal\Core\PrivateKey $privateKey: The private key service.

Overrides UserCacheContextBase::__construct

File

src/Cache/Context/OgRoleCacheContext.php, line 100

Class

OgRoleCacheContext
Defines a cache context service for the OG roles of the current user.

Namespace

Drupal\og\Cache\Context

Code

public function __construct(AccountInterface $user, EntityTypeManagerInterface $entityTypeManager, MembershipManagerInterface $membershipManager, Connection $database, PrivateKey $privateKey) {
  parent::__construct($user);
  $this->entityTypeManager = $entityTypeManager;
  $this->membershipManager = $membershipManager;
  $this->database = $database;
  $this->privateKey = $privateKey;
}