Beispiel #1
0
 public function persistData($data_obj)
 {
     $new_instance = new quote();
     $new_instance->setClientName($data_obj->getClientName());
     $new_instance->setEmail($data_obj->getEmail());
     $new_instance->setPhone($data_obj->getPhone());
     $new_instance->setJobType($data_obj->getJobType());
     $new_instance->setDate($this->getDate());
     $new_instance->setDescription($data_obj->getDescription());
     $em = $this->controller_obj->getDoctrine()->getManager();
     $em->persist($new_instance);
     $em->flush();
 }
 public function quoteProssesing($request)
 {
     $quote = new quote($this);
     $items = $quote->addElementForm();
     $form = $this->createForm(new GenericForm($items), $quote);
     $form->handleRequest($request);
     if ($form->isValid()) {
         $quote->persistData($form->getData());
         $this->quoteEmailing($form);
         unset($form);
         unset($quote);
         $quote = new quote($this);
         $items = $quote->addElementForm();
         $form = $this->createForm(new GenericForm($items), $quote);
         return $form;
     }
     return $form;
 }