diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index 4fa40b0..a6c58b4 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -426,7 +426,7 @@ public function __sleep() { * {@inheritdoc} */ public function getOriginalId() { - // By default, entities do not support the tracking of original IDs. + // By default, entities do not support renames and do not have original IDs. return NULL; } @@ -434,7 +434,7 @@ public function getOriginalId() { * {@inheritdoc} */ public function setOriginalId($id) { - // By default, entities do not support the tracking of original IDs. + // By default, entities do not support renames and do not have original IDs. return $this; } diff --git a/core/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php index cabb271..62acf9d 100644 --- a/core/lib/Drupal/Core/Entity/EntityInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityInterface.php @@ -301,7 +301,8 @@ public function referencedEntities(); * Returns the original ID. * * @return int|string|null - * The original ID, if any. + * The original ID, if any. Entity types that do not support renames will + * never have an original ID and will return NULL. */ public function getOriginalId(); @@ -309,7 +310,8 @@ public function getOriginalId(); * Sets the original ID. * * @param int|string|null $id - * The new ID to set as original ID. + * The new ID to set as original ID. If the entity supports renames, setting + * NULL will prevent an update from being considered a rename. * * @return $this */