You are here

public function FieldBlock::getCacheTags in Field as Block 8.2

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/FieldBlock.php, line 420

Class

FieldBlock
Provides a fieldblock.

Namespace

Drupal\fieldblock\Plugin\Block

Code

public function getCacheTags() {
  $entity = $this
    ->getEntity();
  if ($entity) {
    return $entity
      ->getCacheTags();
  }
  return parent::getCacheTags();
}