function NodeAccessGrantsCacheContext::__construct

Same name and namespace in other branches
  1. 11.x core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php \Drupal\node\Cache\NodeAccessGrantsCacheContext::__construct()

Constructs a new UserCacheContextBase class.

Parameters

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

Overrides UserCacheContextBase::__construct

File

core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php, line 25

Class

NodeAccessGrantsCacheContext
Defines the node access view cache context service.

Namespace

Drupal\node\Cache

Code

public function __construct(AccountInterface $user, protected EntityTypeManagerInterface $entityTypeManager) {
  parent::__construct($user);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.