You are here

public function SocialGroupTagsBlock::getCacheTags in Open Social 8.6

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_tagging/src/Plugin/Block/SocialGroupTagsBlock.php \Drupal\social_tagging\Plugin\Block\SocialGroupTagsBlock::getCacheTags()
  2. 8.4 modules/social_features/social_tagging/src/Plugin/Block/SocialGroupTagsBlock.php \Drupal\social_tagging\Plugin\Block\SocialGroupTagsBlock::getCacheTags()
  3. 8.5 modules/social_features/social_tagging/src/Plugin/Block/SocialGroupTagsBlock.php \Drupal\social_tagging\Plugin\Block\SocialGroupTagsBlock::getCacheTags()
  4. 8.7 modules/social_features/social_tagging/src/Plugin/Block/SocialGroupTagsBlock.php \Drupal\social_tagging\Plugin\Block\SocialGroupTagsBlock::getCacheTags()
  5. 8.8 modules/social_features/social_tagging/src/Plugin/Block/SocialGroupTagsBlock.php \Drupal\social_tagging\Plugin\Block\SocialGroupTagsBlock::getCacheTags()
  6. 10.3.x modules/social_features/social_tagging/src/Plugin/Block/SocialGroupTagsBlock.php \Drupal\social_tagging\Plugin\Block\SocialGroupTagsBlock::getCacheTags()
  7. 10.0.x modules/social_features/social_tagging/src/Plugin/Block/SocialGroupTagsBlock.php \Drupal\social_tagging\Plugin\Block\SocialGroupTagsBlock::getCacheTags()
  8. 10.1.x modules/social_features/social_tagging/src/Plugin/Block/SocialGroupTagsBlock.php \Drupal\social_tagging\Plugin\Block\SocialGroupTagsBlock::getCacheTags()
  9. 10.2.x modules/social_features/social_tagging/src/Plugin/Block/SocialGroupTagsBlock.php \Drupal\social_tagging\Plugin\Block\SocialGroupTagsBlock::getCacheTags()

The cache tags associated with this object.

When this object is modified, these cache tags will be invalidated.

Return value

string[] A set of cache tags.

Overrides ContextAwarePluginBase::getCacheTags

File

modules/social_features/social_tagging/src/Plugin/Block/SocialGroupTagsBlock.php, line 117

Class

SocialGroupTagsBlock
Provides a 'SocialGroupTags' block.

Namespace

Drupal\social_tagging\Plugin\Block

Code

public function getCacheTags() {
  $cache_tags = parent::getCacheTags();
  $group = $this->routeMatch
    ->getParameter('group');
  if ($group instanceof GroupInterface) {
    $cache_tags[] = 'group:' . $group
      ->id();
  }
  return $cache_tags;
}