W3cubDocs

/Drupal 8

public function EntityStorageBase::loadUnchanged

public EntityStorageBase::loadUnchanged($id)

Loads an unchanged entity from the database.

@todo Remove this method once we have a reliable way to retrieve the unchanged entity from the entity object.

Parameters

mixed $id: The ID of the entity to load.

Return value

\Drupal\Core\Entity\EntityInterface|null The unchanged entity, or NULL if the entity cannot be loaded.

Overrides EntityStorageInterface::loadUnchanged

File

core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 107

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

public function loadUnchanged($id) {
  $this->resetCache(array($id));
  return $this->load($id);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityStorageBase.php/function/EntityStorageBase::loadUnchanged/8.1.x