You are here

function cer_get_entity_original in Corresponding Entity References 7.3

Gets the original entity, before update. If no update has taken place, the current entity is returned.

1 string reference to 'cer_get_entity_original'
cer_entity_property_info in ./cer.module
Implements hook_entity_property_info().

File

./cer.properties.inc, line 54
Contains entity property callback functions for the 'cer' struct exposed to Entity API.

Code

function cer_get_entity_original(array $data, array $options, $property, $data_type, array $info) {
  return new EntityDrupalWrapper($data[0], isset($data[1]->original) ? $data[1]->original : $data[1]);
}