You are here

public function FixedBlockContentBlock::getCacheTags in Fixed Block Content 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/FixedBlockContentBlock.php, line 118

Class

FixedBlockContentBlock
Provides a fixed content block placement.

Namespace

Drupal\fixed_block_content\Plugin\Block

Code

public function getCacheTags() {
  $cache_tags = parent::getCacheTags();

  /** @var \Drupal\fixed_block_content\FixedBlockContentInterface $fixed_block */
  if ($fixed_block = FixedBlockContent::load($this
    ->getDerivativeId())) {
    $cache_tags = Cache::mergeTags($cache_tags, $fixed_block
      ->getCacheTags());
    $cache_tags = Cache::mergeTags($cache_tags, $fixed_block
      ->getBlockContent()
      ->getCacheTags());
  }
  return $cache_tags;
}