function EntityBase::getCacheTags

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::getCacheTags()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::getCacheTags()
  3. 10 core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::getCacheTags()

Overrides CacheableDependencyTrait::getCacheTags

1 call to EntityBase::getCacheTags()
View::invalidateCaches in core/modules/views/src/Entity/View.php
Invalidates cache tags.

File

core/lib/Drupal/Core/Entity/EntityBase.php, line 482

Class

EntityBase
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public function getCacheTags() {
    if ($this->cacheTags) {
        return Cache::mergeTags($this->getCacheTagsToInvalidate(), $this->cacheTags);
    }
    return $this->getCacheTagsToInvalidate();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.