abstract class UserCacheContextBase (View source)

Base class for user-based cache contexts.

Subclasses need to implement either \Drupal\Core\Cache\Context\CacheContextInterface or \Drupal\Core\Cache\Context\CalculatedCacheContextInterface.

Properties

protected AccountInterface $user

The account object.

Methods

__construct(AccountInterface $user)

Constructs a new UserCacheContextBase class.

Details

__construct(AccountInterface $user)

Constructs a new UserCacheContextBase class.

Parameters

AccountInterface $user

The current user.