You are here

public function ViewsExposedFilterBlock::getCacheContexts in Drupal 9

Same name and namespace in other branches
  1. 8 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()

Overrides ContextAwarePluginTrait::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);
}