public function OrderStorage::loadUnchanged in Commerce Core 8.2
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 ContentEntityStorageBase::loadUnchanged
File
- modules/
order/ src/ OrderStorage.php, line 91
Class
- OrderStorage
- Defines the order storage.
Namespace
Drupal\commerce_orderCode
public function loadUnchanged($id) {
// This method is used by the entity save process, triggering an order
// refresh would cause a save-within-a-save.
$this->skipRefresh = TRUE;
$unchanged_order = parent::loadUnchanged($id);
$this->skipRefresh = FALSE;
return $unchanged_order;
}