EmpireUserCouponExtension
class EmpireUserCouponExtension extends Twig_Extension
Class EmpireUserCouponExtension is injected as empire_user_coupons_list_plugin.twig_extension service. EmpireUserCouponExtension handles the logic and provides necessary data for managed entity in twig.
Methods
getFunctions()
{@inheritdoc}
int|array
getActiveCouponsCountForUser()
Count all active coupons for logged user
array
getCouponLists()
Find all coupons for user by id
array
getCouponDiscountForOrder(string $couponCode)
Get discount for provided coupon
string
getName()
Returns the name of the extension.
Details
at line 33
__construct(CouponManager $couponManager)
EmpireUserCouponExtension constructor.
at line 41
getFunctions()
{@inheritdoc}
at line 54
int|array
getActiveCouponsCountForUser()
Count all active coupons for logged user
at line 63
array
getCouponLists()
Find all coupons for user by id
at line 80
array
getCouponDiscountForOrder(string $couponCode)
Get discount for provided coupon
at line 92
string
getName()
Returns the name of the extension.