ContentEntityBase::clearTranslationCache

protected ContentEntityBase::clearTranslationCache()

Clear entity translation object cache to remove stale references.

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 395

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

1
2
3
4
5
protected function clearTranslationCache() {
  foreach ($this->translations as &$translation) {
    unset($translation['entity']);
  }
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.