function Access::getCacheContexts

Same name and namespace in other branches
  1. 9 core/modules/node/src/Plugin/views/filter/Access.php \Drupal\node\Plugin\views\filter\Access::getCacheContexts()
  2. 8.9.x core/modules/node/src/Plugin/views/filter/Access.php \Drupal\node\Plugin\views\filter\Access::getCacheContexts()
  3. 10 core/modules/node/src/Plugin/views/filter/Access.php \Drupal\node\Plugin\views\filter\Access::getCacheContexts()

Overrides FilterPluginBase::getCacheContexts

File

core/modules/node/src/Plugin/views/filter/Access.php, line 50

Class

Access
Filter by node_access records.

Namespace

Drupal\node\Plugin\views\filter

Code

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

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