public function Current::getCacheContexts in Drupal 10
Same name and namespace in other branches
- 8 core/modules/user/src/Plugin/views/filter/Current.php \Drupal\user\Plugin\views\filter\Current::getCacheContexts()
- 9 core/modules/user/src/Plugin/views/filter/Current.php \Drupal\user\Plugin\views\filter\Current::getCacheContexts()
File
- core/
modules/ user/ src/ Plugin/ views/ filter/ Current.php, line 48
Class
- Current
- Filter handler for the current user.
Namespace
Drupal\user\Plugin\views\filterCode
public function getCacheContexts() {
$contexts = parent::getCacheContexts();
// This filter depends on the current user.
$contexts[] = 'user';
return $contexts;
}