abstract class UserCacheContextBase in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Cache/Context/UserCacheContextBase.php \Drupal\Core\Cache\Context\UserCacheContextBase
Base class for user-based cache contexts.
Subclasses need to implement either \Drupal\Core\Cache\Context\CacheContextInterface or \Drupal\Core\Cache\Context\CalculatedCacheContextInterface.
Hierarchy
- class \Drupal\Core\Cache\Context\UserCacheContextBase
Expanded class hierarchy of UserCacheContextBase
1 file declares its use of UserCacheContextBase
- NodeAccessGrantsCacheContext.php in core/
modules/ node/ src/ Cache/ NodeAccessGrantsCacheContext.php - Contains \Drupal\node\Cache\NodeAccessGrantsCacheContext.
File
- core/
lib/ Drupal/ Core/ Cache/ Context/ UserCacheContextBase.php, line 19 - Contains \Drupal\Core\Cache\Context\UserCacheContextBase.
Namespace
Drupal\Core\Cache\ContextView source
abstract class UserCacheContextBase {
/**
* The account object.
*
* @var \Drupal\Core\Session\AccountInterface
*/
protected $user;
/**
* Constructs a new UserCacheContextBase class.
*
* @param \Drupal\Core\Session\AccountInterface $user
* The current user.
*/
public function __construct(AccountInterface $user) {
$this->user = $user;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UserCacheContextBase:: |
protected | property | The account object. | |
UserCacheContextBase:: |
public | function | Constructs a new UserCacheContextBase class. | 1 |