Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/Cache/Context/UserCacheContext.php
- 9 core/lib/Drupal/Core/Cache/Context/UserCacheContext.php
Namespace
Drupal\Core\Cache\Context
File
core/lib/Drupal/Core/Cache/Context/UserCacheContext.php
View source
<?php
namespace Drupal\Core\Cache\Context;
use Drupal\Core\Cache\CacheableMetadata;
class UserCacheContext extends UserCacheContextBase implements CacheContextInterface {
public static function getLabel() {
return t('User');
}
public function getContext() {
return $this->user
->id();
}
public function getCacheableMetadata() {
return new CacheableMetadata();
}
}
Classes