function replicate_clone_entity_by_id in Replicate 7
Replicate the entity corresponding to the type and id passed in argument.
Do not save the replicated entity.
Parameters
string $entity_type: The entity type.
int $id: The unique entity identifier.
Return value
object A new replicated entity.
See also
File
- ./replicate.module, line 72 
- Main methods of Replicate module.
Code
function replicate_clone_entity_by_id($entity_type, $id) {
  if (($original = entity_load_single($entity_type, $id)) !== FALSE) {
    return replicate_clone_entity($entity_type, $original);
  }
  return FALSE;
}