You are here

protected function Tag::filterFormatCacheTags in Extensible BBCode 8.3

Same name and namespace in other branches
  1. 4.0.x src/Entity/Tag.php \Drupal\xbbcode\Entity\Tag::filterFormatCacheTags()

Get the cache tags of all text formats that use this BBCode tag.

@internal

Return value

string[] Array of cache tags.

1 call to Tag::filterFormatCacheTags()
Tag::invalidateTagsOnSave in src/Entity/Tag.php
Override to never invalidate the entity's cache tag; the config system already invalidates it.

File

src/Entity/Tag.php, line 262

Class

Tag
Represents a custom XBBCode tag that can be altered by administrators.

Namespace

Drupal\xbbcode\Entity

Code

protected function filterFormatCacheTags() : array {
  if ($formats = $this
    ->getFormats()) {
    $tags = [
      'config:filter_format_list',
    ];
    foreach ($formats as $id => $format) {
      $tags[] = "config:filter_format:{$id}";
    }
    return array_combine($tags, $tags);
  }
  return [];
}