You are here

public function EntityStorageBase::loadUnchanged in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::loadUnchanged()

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

1 call to EntityStorageBase::loadUnchanged()
EntityStorageBase::doPreSave in core/lib/Drupal/Core/Entity/EntityStorageBase.php
Performs presave entity processing.

File

core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 112
Contains \Drupal\Core\Entity\EntityStorageBase.

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

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