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

protected function clearTranslationCache() {
  foreach ($this->translations as &$translation) {
    unset($translation['entity']);
  }
}
doc_Drupal
2016-10-29 08:56:54
Comments
Leave a Comment

Please login to continue.