You are here

public function SocialAlbumCountAndAddBlock::getCacheTags in Open Social 10.0.x

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_album/src/Plugin/Block/SocialAlbumCountAndAddBlock.php \Drupal\social_album\Plugin\Block\SocialAlbumCountAndAddBlock::getCacheTags()
  2. 10.1.x modules/social_features/social_album/src/Plugin/Block/SocialAlbumCountAndAddBlock.php \Drupal\social_album\Plugin\Block\SocialAlbumCountAndAddBlock::getCacheTags()
  3. 10.2.x modules/social_features/social_album/src/Plugin/Block/SocialAlbumCountAndAddBlock.php \Drupal\social_album\Plugin\Block\SocialAlbumCountAndAddBlock::getCacheTags()

Overrides ContextAwarePluginTrait::getCacheTags

File

modules/social_features/social_album/src/Plugin/Block/SocialAlbumCountAndAddBlock.php, line 140

Class

SocialAlbumCountAndAddBlock
Provides a block to display images count and a button for adding new images.

Namespace

Drupal\social_album\Plugin\Block

Code

public function getCacheTags() {
  $tags = parent::getCacheTags();
  if ($properties = $this
    ->getProperties()) {
    $type = $properties['type'];
    $tags = Cache::mergeTags($tags, [
      $type . ':' . $this->routeMatch
        ->getRawParameter($type),
    ]);
  }
  return $tags;
}