public function OgMembershipStateCacheContext::__construct in Organic groups 8
Constructs a new UserCacheContextBase class.
Parameters
\Drupal\Core\Session\AccountInterface $user: The current user.
\Drupal\og\OgContextInterface $og_context: The OG context provider.
\Drupal\og\MembershipManagerInterface $membership_manager: The membership manager service.
File
- src/
Cache/ Context/ OgMembershipStateCacheContext.php, line 58
Class
- OgMembershipStateCacheContext
- Defines a cache context service, for "membership state" caching.
Namespace
Drupal\og\Cache\ContextCode
public function __construct(AccountInterface $user, OgContextInterface $og_context, MembershipManagerInterface $membership_manager) {
$this->user = $user;
$this->ogContext = $og_context;
$this->membershipManager = $membership_manager;
}