Ejemplo n.º 1
0
 public function getEntityProxy($entity, BusinessEntity $businessEntity, EntityManager $em)
 {
     $entityProxy = $em->getRepository('Victoire\\Bundle\\CoreBundle\\Entity\\EntityProxy')->findOneBy([$businessEntity->getId() => $entity]);
     if (!$entityProxy) {
         $entityProxy = new EntityProxy();
         $entityProxy->setEntity($entity, $businessEntity->getName());
     }
     return $entityProxy;
 }