diff --git a/core/lib/Drupal/Core/Entity/EntityChangedInterface.php b/core/lib/Drupal/Core/Entity/EntityChangedInterface.php index 747571799c..9337cb0d68 100644 --- a/core/lib/Drupal/Core/Entity/EntityChangedInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityChangedInterface.php @@ -37,6 +37,10 @@ public function setChangedTime($timestamp); /** * Gets the timestamp of the last entity change across all translations. * + * This method will return the highest timestamp across all translations. If + * you need to check that no translation was changed after a certain time, you + * have to check each translation's timestamp individually. + * * @return int * The timestamp of the last entity save operation across all * translations. diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php index 6906999596..271e24def2 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php +++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraintValidator.php @@ -30,6 +30,7 @@ public function validate($entity, Constraint $constraint) { // updates the entity object on submit. We use the timestamp to // determine when a previous entity translation version has been edited // and is currently being saved. + // @see \Drupal\node\NodeForm::form(). if ($saved_entity) { $common_translation_languages = array_intersect_key($entity->getTranslationLanguages(), $saved_entity->getTranslationLanguages()); foreach (array_keys($common_translation_languages) as $langcode) {