You are here

public function ForumBlockBase::getCacheContexts in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/forum/src/Plugin/Block/ForumBlockBase.php \Drupal\forum\Plugin\Block\ForumBlockBase::getCacheContexts()

Overrides ContextAwarePluginTrait::getCacheContexts

File

core/modules/forum/src/Plugin/Block/ForumBlockBase.php, line 85

Class

ForumBlockBase
Provides a base class for Forum blocks.

Namespace

Drupal\forum\Plugin\Block

Code

public function getCacheContexts() {
  return Cache::mergeContexts(parent::getCacheContexts(), [
    'user.node_grants:view',
  ]);
}