You are here

public function TocBlockBase::getCacheTags in TOC API 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/TocBlockBase.php, line 65

Class

TocBlockBase
Provides a base TOC block which displays the current TOC module's TOC in a block.

Namespace

Drupal\toc_api\Plugin\Block

Code

public function getCacheTags() {
  $node = $this
    ->getCurrentNode();
  return $node ? [
    'node:' . $node
      ->id(),
  ] : [];
}