|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->eventDispatcher->dispatch(new EntityComponentEvent($newEntity), EntityComponentEvent::DUPLICATE_EVENT); |
|
|
$this->eventDispatcher->dispatch(new EntityComponentEvent($newEntity), EntityComponentEvent::DUPLICATE_EVENT); |
|
|
//Ne pas utiliser create ici! Sinon pour certaine entité comme ProductFamily on réajoute un orginProduct |
|
|
//Ne pas utiliser create ici! Sinon pour certaine entité comme ProductFamily on réajoute un orginProduct |
|
|
$this->entityManager->persist($newEntity); |
|
|
|
|
|
|
|
|
$this->entityManager->create($newEntity, false); |
|
|
|
|
|
|
|
|
return $newEntity; |
|
|
return $newEntity; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
return $entity; |
|
|
return $entity; |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |