コード例 #1
0
 public function addToHistory(DiscountCode $code, Customer $customer)
 {
     $history = new DiscountCodeHistory();
     $history->setCode($code);
     $history->setCustomer($customer);
     $history->setStatus(DiscountCodeHistory::STATUS_APPLIED_ONLY);
     $this->em->persist($history);
     $this->em->flush($history);
 }
 public function setCreationData()
 {
     $this->__load();
     return parent::setCreationData();
 }