public function findOneByCode($couponCode) { $coupon = parent::findOneBy(['code' => $couponCode]); if ($coupon === null) { throw $this->getEntityNotFoundException(); } return $coupon; }
public function findOneByExternalId($externalId) { return parent::findOneBy(['externalId' => $externalId]); }
/** * @param UuidInterface $uuid4 * @return Attachment */ public function findOneByUuid(UuidInterface $uuid4) { return $this->returnOrThrowNotFoundException(parent::findOneBy(['id' => $uuid4])); }
public function findOneBySku($sku) { return parent::findOneBy(['sku' => $sku]); }
public function findOneByCode($code) { return $this->returnOrThrowNotFoundException(parent::findOneBy(['code' => $code])); }
/** * @param string $orderExternalId * @return Order */ public function findOneByExternalId($orderExternalId) { return $this->returnOrThrowNotFoundException(parent::findOneBy(['externalId' => $orderExternalId])); }