public function populateFromQuote(FormPopulatingEvent $event)
 {
     if (null !== ($id = $event->getFormParam('quote_variant', 'quote'))) {
         $quote = $this->om->getRepository('JLMCommerceBundle:Quote')->find($id);
         $event->getForm()->get('quote')->setData($quote);
     }
 }
 public function populateFromQuote(FormPopulatingEvent $event)
 {
     if (null !== ($id = $event->getParam('quote'))) {
         $quote = $this->om->getRepository('JLMCommerceBundle:Quote')->find($id);
         $entity = BillFactory::create(new VariantBillBuilder($quote));
         $event->getForm()->setData($entity);
     }
 }
 public function populateFromDoor(FormPopulatingEvent $event)
 {
     if (null !== ($id = $event->getParam('installation'))) {
         $install = $this->om->getRepository('JLMModelBundle:Door')->find($id);
         $entity = BillFactory::create(new DoorBillBuilder($install));
         $event->getForm()->setData($entity);
     }
 }