CouponManager
class CouponManager implements BasicEntityManagerInterface, JQGridInterface
Class CouponManager is injected as alligator.coupon_manager service. CouponManager handles the logic for managed entity.
Properties
| protected CouponRepository | $couponRepository | ||
| protected CouponEventContainer | $eventContainer |
Methods
CouponManager constructor.
Find promotions by search term with pagination
Find all promotions with pagination
Count all promotions
Find promotion by id
Remove promotions provided by array of ids
{@inheritdoc}
Find coupon by id
Find all coupons for user by id
Count all active coupons for logged user
Find all coupon data for user
Find all promotions for specific user with pagination
Count all promotions for specific user
Find all users email
No description
Details
at line 44
__construct(CouponRepository $couponRepository, CouponEventContainer $eventContainer)
CouponManager constructor.
at line 60
array
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $JQGridWrapper = null)
Find promotions by search term with pagination
at line 75
array
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $JQGridWrapper = null)
Find all promotions with pagination
at line 89
array
getCountForJQGRID(null $searchParams = null, null $sortParams = null, array $additionalParams = array(), JQGridWrapper $JQGridWrapper = null)
Count all promotions
at line 100
array
getPromotionById(int $id)
Find promotion by id
at line 111
bool
removePromotionsFromArray(array $arrayOfPromotions)
Remove promotions provided by array of ids
at line 119
editCoupon($content)
{@inheritdoc}
at line 208
Coupon
useCoupon(Coupon $coupon)
Increment coupon usage and set used to TRUE if number of uses reached usage limit
at line 221
Coupon|null
getCouponById(int $id)
Find coupon by id
at line 230
array
getAllCouponsForUser()
Find all coupons for user by id
at line 244
int|array
getActiveCouponsCountForUser()
Count all active coupons for logged user
at line 258
array
getAllCouponsForFrontendProfileView()
Find all coupon data for user
at line 283
array
findAllCouponsForFrontend(int $page, int $offset, bool $active, int $userId = null)
Find all promotions for specific user with pagination
at line 306
array
countAllCouponsForFrontend(bool $active, int $userId = null)
Count all promotions for specific user
at line 327
array
getUsers(string $param, int $page, int $offset, array|null $arrayOfUsers = null)
Find all users email