function ViewsExposedFilterBlock::getCacheContexts

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php \Drupal\views\Plugin\Block\ViewsExposedFilterBlock::getCacheContexts()
  2. 10 core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php \Drupal\views\Plugin\Block\ViewsExposedFilterBlock::getCacheContexts()
  3. 11.x core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php \Drupal\views\Plugin\Block\ViewsExposedFilterBlock::getCacheContexts()

File

core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php, line 22

Class

ViewsExposedFilterBlock
Provides a 'Views Exposed Filter' block.

Namespace

Drupal\views\Plugin\Block

Code

public function getCacheContexts() {
    $contexts = $this->view->display_handler
        ->getCacheMetadata()
        ->getCacheContexts();
    return Cache::mergeContexts(parent::getCacheContexts(), $contexts);
}

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