function Status::getCacheContexts

Same name in this branch
  1. 8.9.x core/modules/node/src/Plugin/views/filter/Status.php \Drupal\node\Plugin\views\filter\Status::getCacheContexts()
Same name and namespace in other branches
  1. 9 core/modules/media/src/Plugin/views/filter/Status.php \Drupal\media\Plugin\views\filter\Status::getCacheContexts()
  2. 9 core/modules/node/src/Plugin/views/filter/Status.php \Drupal\node\Plugin\views\filter\Status::getCacheContexts()
  3. 10 core/modules/media/src/Plugin/views/filter/Status.php \Drupal\media\Plugin\views\filter\Status::getCacheContexts()
  4. 10 core/modules/node/src/Plugin/views/filter/Status.php \Drupal\node\Plugin\views\filter\Status::getCacheContexts()
  5. 11.x core/modules/media/src/Plugin/views/filter/Status.php \Drupal\media\Plugin\views\filter\Status::getCacheContexts()
  6. 11.x core/modules/node/src/Plugin/views/filter/Status.php \Drupal\node\Plugin\views\filter\Status::getCacheContexts()

Overrides FilterPluginBase::getCacheContexts

File

core/modules/media/src/Plugin/views/filter/Status.php, line 49

Class

Status
Filter by published status.

Namespace

Drupal\media\Plugin\views\filter

Code

public function getCacheContexts() {
    $contexts = parent::getCacheContexts();
    $contexts[] = 'user';
    return $contexts;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.