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);
}
doc_Drupal
2016-10-29 09:07:41
Comments
Leave a Comment

Please login to continue.