CouponRepository
class CouponRepository extends EntityRepository
Class CouponRepository is injected as alligator.coupon_repository service. CouponRepository is used for crud operation for managed entity.
Use this class to work with database.
Constants
| ALIAS |
Alias for coupon |
| PROMOTION_ALIAS |
Alias for promotion |
| RULE_ALIAS |
Alias for rule |
| ACTION_ALIAS |
Alias for action |
Methods
null|Coupon
array
getAllCouponsForUser(int $userId)
Find all coupons for user by id
array
getAllCouponsCountForUser(int $userId)
Count all active coupons for user by id
array
findAllCouponsForFrontend(int $page, int $offset, bool $active, int $userId)
Find all coupons for user with pagination
array
countAllCouponsForFrontend(bool $active, int $userId)
Count all coupons for user. If $active is TRUE then count only active coupons
Coupon|null
findCouponByPK(int $id)
Find coupon by id
Details
at line 93
array
getAllCouponsForUser(int $userId)
Find all coupons for user by id
at line 115
array
getAllCouponsCountForUser(int $userId)
Count all active coupons for user by id
at line 141
array
findAllCouponsForFrontend(int $page, int $offset, bool $active, int $userId)
Find all coupons for user with pagination
at line 176
array
countAllCouponsForFrontend(bool $active, int $userId)
Count all coupons for user. If $active is TRUE then count only active coupons
at line 197
Coupon|null
findCouponByPK(int $id)
Find coupon by id