protected function Tag::invalidateTagsOnSave in Extensible BBCode 4.0.x
Same name and namespace in other branches
- 8.3 src/Entity/Tag.php \Drupal\xbbcode\Entity\Tag::invalidateTagsOnSave()
Override to never invalidate the entity's cache tag; the config system already invalidates it.
Overrides ConfigEntityBase::invalidateTagsOnSave
File
- src/
Entity/ Tag.php, line 175
Class
- Tag
- Represents a custom XBBCode tag that can be altered by administrators.
Namespace
Drupal\xbbcode\EntityCode
protected function invalidateTagsOnSave($update) : void {
parent::invalidateTagsOnSave($update);
// Rebuild the tag plugins.
\Drupal::service('plugin.manager.xbbcode')
->clearCachedDefinitions();
// Filters can't tag their formats' cache, so invalidate it explicitly.
if ($tags = $this
->filterFormatCacheTags()) {
filter_formats_reset();
}
if (!$update) {
// New tags affect all filters without a tag set.
$tags['xbbcode_tag_new'] = 'xbbcode_tag_new';
}
if ($tags) {
Cache::invalidateTags($tags);
}
}