8.2.x Entity.php public Entity::getOriginalId()
8.0.x Entity.php public Entity::getOriginalId()
8.1.x Entity.php public Entity::getOriginalId()
8.3.x Entity.php public Entity::getOriginalId()

Gets the original ID.

Return value

int|string|null The original ID, or NULL if no ID was set or for entity types that do not support renames.

Overrides EntityInterface::getOriginalId

1 call to Entity::getOriginalId()
ContentEntityBase::hasTranslationChanges in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Determines if the current translation of the entity has unsaved changes.
1 method overrides Entity::getOriginalId()
ConfigEntityBase::getOriginalId in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
Gets the original ID.

File

core/lib/Drupal/Core/Entity/Entity.php, line 565

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public function getOriginalId() {
  // By default, entities do not support renames and do not have original IDs.
  return NULL;
}