function Status::getCacheContexts

Overrides FilterPluginBase::getCacheContexts

File

core/modules/node/src/Plugin/views/filter/Status.php, line 52

Class

Status
Filters out unpublished content if the current user cannot view it.

Namespace

Drupal\node\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.