Same name and namespace in other branches
  1. 8.9.x core/modules/user/src/Plugin/views/filter/Current.php \Drupal\user\Plugin\views\filter\Current::getCacheContexts()
  2. 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

Namespace

Drupal\user\Plugin\views\filter

Code

public function getCacheContexts() {
  $contexts = parent::getCacheContexts();

  // This filter depends on the current user.
  $contexts[] = 'user';
  return $contexts;
}