Same name and namespace in other branches
  1. 8.9.x core/modules/shortcut/src/Entity/Shortcut.php \Drupal\shortcut\Entity\Shortcut::getCacheTagsToInvalidate()
  2. 9 core/modules/shortcut/src/Entity/Shortcut.php \Drupal\shortcut\Entity\Shortcut::getCacheTagsToInvalidate()

Returns the cache tags that should be used to invalidate caches.

This will not return additional cache tags added through addCacheTags().

Return value

string[] Set of cache tags.

Overrides EntityInterface::getCacheTagsToInvalidate

See also

\Drupal\Core\Cache\RefinableCacheableDependencyInterface::addCacheTags()

\Drupal\Core\Cache\CacheableDependencyInterface::getCacheTags()

1 call to Shortcut::getCacheTagsToInvalidate()
Shortcut::postSave in core/modules/shortcut/src/Entity/Shortcut.php
Acts on a saved entity before the insert or update hook is invoked.

File

core/modules/shortcut/src/Entity/Shortcut.php, line 165

Class

Shortcut
Defines the shortcut entity class.

Namespace

Drupal\shortcut\Entity

Code

public function getCacheTagsToInvalidate() {
  return $this->shortcut_set->entity
    ->getCacheTags();
}