You are here

public function RecentGroupContentBlock::getCacheTags in Organic groups 8

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

src/Plugin/Block/RecentGroupContentBlock.php, line 207

Class

RecentGroupContentBlock
Provides a block that shows recent group content for the current group.

Namespace

Drupal\og\Plugin\Block

Code

public function getCacheTags() {
  $tags = parent::getCacheTags();
  if ($group = $this->ogContext
    ->getGroup()) {
    $tags = Cache::mergeTags(Cache::buildTags('og-group-content', $group
      ->getCacheTagsToInvalidate()), $tags);
  }
  return $tags;
}