function Current::getCacheContexts
Same name in other branches
- 9 core/modules/user/src/Plugin/views/filter/Current.php \Drupal\user\Plugin\views\filter\Current::getCacheContexts()
- 8.9.x core/modules/user/src/Plugin/views/filter/Current.php \Drupal\user\Plugin\views\filter\Current::getCacheContexts()
- 11.x core/modules/user/src/Plugin/views/filter/Current.php \Drupal\user\Plugin\views\filter\Current::getCacheContexts()
Overrides FilterPluginBase::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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.