3 namespace Drupal\Core\Entity;
6 * Provides methods for an entity to support revision translation.
8 interface TranslatableRevisionableInterface extends TranslatableInterface, RevisionableInterface {
11 * Checks whether this is the latest revision affecting this translation.
14 * TRUE if this revision is the latest one affecting the active translation,
17 public function isLatestTranslationAffectedRevision();
20 * Marks the current revision translation as affected.
22 * Setting the revision translation affected flag through the setter or
23 * through the field directly will always enforce it, which will be used by
24 * the entity storage to determine if the flag should be recomputed or the set
25 * value should be used instead.
26 * @see \Drupal\Core\Entity\ContentEntityStorageBase::populateAffectedRevisionTranslations()
28 * @param bool|null $affected
29 * The flag value. A NULL value can be specified to reset the current value
30 * and make sure a new value will be computed by the system.
34 public function setRevisionTranslationAffected($affected);
37 * Checks whether the current translation is affected by the current revision.
40 * TRUE if the entity object is affected by the current revision, FALSE
43 public function isRevisionTranslationAffected();
46 * Checks if the revision translation affected flag value has been enforced.
49 * TRUE if revision translation affected flag is enforced, FALSE otherwise.
53 public function isRevisionTranslationAffectedEnforced();
56 * Enforces the revision translation affected flag value.
58 * Note that this method call will not have any influence on the storage if
59 * the value of the revision translation affected flag is NULL which is used
60 * as an indication for the storage to recompute the flag.
61 * @see \Drupal\Core\Entity\ContentEntityInterface::setRevisionTranslationAffected()
63 * @param bool $enforced
64 * If TRUE, the value of the revision translation affected flag will be
65 * enforced so that on entity save the entity storage will not recompute it.
66 * Otherwise the storage will recompute it.
72 public function setRevisionTranslationAffectedEnforced($enforced);
75 * Checks if untranslatable fields should affect only the default translation.
78 * TRUE if untranslatable fields should affect only the default translation,
81 public function isDefaultTranslationAffectedOnly();