protected ContentEntityStorageBase::populateAffectedRevisionTranslations(ContentEntityInterface $entity)
Populates the affected flag for all the revision translations.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: An entity object being saved.
File
- core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 534
Class
- ContentEntityStorageBase
- Base class for content entity storage handlers.
Namespace
Drupal\Core\Entity
Code
protected function populateAffectedRevisionTranslations(ContentEntityInterface $entity) { if ($this->entityType->isTranslatable() && $this->entityType->isRevisionable()) { $languages = $entity->getTranslationLanguages(); foreach ($languages as $langcode => $language) { $translation = $entity->getTranslation($langcode); // Avoid populating the value if it was already manually set. $affected = $translation->isRevisionTranslationAffected(); if (!isset($affected) && $translation->hasTranslationChanges()) { $translation->setRevisionTranslationAffected(TRUE); } } } }
Please login to continue.