Ejemplo n.º 1
0
 public function findOneByCode($couponCode)
 {
     $coupon = parent::findOneBy(['code' => $couponCode]);
     if ($coupon === null) {
         throw $this->getEntityNotFoundException();
     }
     return $coupon;
 }
Ejemplo n.º 2
0
 public function findOneByExternalId($externalId)
 {
     return parent::findOneBy(['externalId' => $externalId]);
 }
Ejemplo n.º 3
0
 /**
  * @param UuidInterface $uuid4
  * @return Attachment
  */
 public function findOneByUuid(UuidInterface $uuid4)
 {
     return $this->returnOrThrowNotFoundException(parent::findOneBy(['id' => $uuid4]));
 }
Ejemplo n.º 4
0
 public function findOneBySku($sku)
 {
     return parent::findOneBy(['sku' => $sku]);
 }
Ejemplo n.º 5
0
 public function findOneByCode($code)
 {
     return $this->returnOrThrowNotFoundException(parent::findOneBy(['code' => $code]));
 }
Ejemplo n.º 6
0
 public function create(EntityInterface &$entity)
 {
     parent::create($entity);
     $this->setReferenceNumber($entity);
     $this->flush();
 }