function EntityInterface::getOriginal

Returns the original unchanged entity.

If the entity being saved was not the default revision then the original entity is that specific revision to allow for reliable comparisons.

This is only available while an entity is being saved.

Return value

static|null The original entity.

2 methods override EntityInterface::getOriginal()
EntityBase::getOriginal in core/lib/Drupal/Core/Entity/EntityBase.php
Returns the original unchanged entity.
ViewUI::getOriginal in core/modules/views_ui/src/ViewUI.php
Returns the original unchanged entity.

File

core/lib/Drupal/Core/Entity/EntityInterface.php, line 459

Class

EntityInterface
Defines a common interface for all entity objects.

Namespace

Drupal\Core\Entity

Code

public function getOriginal() : ?static;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.