3 namespace Drupal\views_test_data\Plugin\views\filter;
5 use Drupal\views\Plugin\views\filter\FilterPluginBase;
8 * @ViewsFilter("views_test_test_cache_context")
10 class ViewsTestCacheContextFilter extends FilterPluginBase {
15 public function query() {
16 $this->value = \Drupal::state()->get('views_test_cache_context', 'George');
24 public function getCacheContexts() {
25 $cache_contexts = parent::getCacheContexts();
27 $cache_contexts[] = 'views_test_cache_context';
28 return $cache_contexts;