class Coupon extends BaseAction implements EventSubscriberInterface

Process Coupon Events

Methods

mixed
genericToggleVisibility( ModelCriteria $query, ToggleVisibilityEvent $event, EventDispatcherInterface $dispatcher = null)

Toggle visibility for an object

from  BaseAction
__construct( RequestStack $requestStack, CouponFactory $couponFactory, CouponManager $couponManager, ConditionInterface $noConditionRule, ConditionFactory $conditionFactory)

No description

create( CouponCreateOrUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Occurring when a Coupon is about to be created

update( CouponCreateOrUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Occurring when a Coupon is about to be updated

delete( CouponDeleteEvent $event)

No description

updateCondition( CouponCreateOrUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Occurring when a Coupon condition is about to be updated

clearAllCoupons( Event $event, $eventName, EventDispatcherInterface $dispatcher)

Clear all coupons in session.

consume( CouponConsumeEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Occurring when a Coupon condition is about to be consumed

updateOrderDiscount( Event $event, $eventName, EventDispatcherInterface $dispatcher)

No description

testFreePostage( OrderEvent $event)

No description

afterOrder( OrderEvent $event, $eventName, EventDispatcherInterface $dispatcher)

No description

static 
getSubscribedEvents()

{@inheritdoc}

Details

in BaseAction at line 130
mixed genericToggleVisibility( ModelCriteria $query, ToggleVisibilityEvent $event, EventDispatcherInterface $dispatcher = null)

Toggle visibility for an object

Parameters

ModelCriteria $query
ToggleVisibilityEvent $event
EventDispatcherInterface $dispatcher

Return Value

mixed

at line 66
__construct( RequestStack $requestStack, CouponFactory $couponFactory, CouponManager $couponManager, ConditionInterface $noConditionRule, ConditionFactory $conditionFactory)

Parameters

RequestStack $requestStack
CouponFactory $couponFactory
CouponManager $couponManager
ConditionInterface $noConditionRule
ConditionFactory $conditionFactory

at line 87
create( CouponCreateOrUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Occurring when a Coupon is about to be created

Parameters

CouponCreateOrUpdateEvent $event Event creation or update Coupon
$eventName
EventDispatcherInterface $dispatcher

at line 101
update( CouponCreateOrUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Occurring when a Coupon is about to be updated

Parameters

CouponCreateOrUpdateEvent $event Event creation or update Coupon
$eventName
EventDispatcherInterface $dispatcher

at line 108
delete( CouponDeleteEvent $event)

Parameters

CouponDeleteEvent $event

at line 133
updateCondition( CouponCreateOrUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Occurring when a Coupon condition is about to be updated

Parameters

CouponCreateOrUpdateEvent $event Event creation or update Coupon condition
$eventName
EventDispatcherInterface $dispatcher

at line 147
clearAllCoupons( Event $event, $eventName, EventDispatcherInterface $dispatcher)

Clear all coupons in session.

Parameters

Event $event
$eventName
EventDispatcherInterface $dispatcher

at line 164
consume( CouponConsumeEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Occurring when a Coupon condition is about to be consumed

Parameters

CouponConsumeEvent $event Event consuming Coupon
$eventName
EventDispatcherInterface $dispatcher

at line 195
updateOrderDiscount( Event $event, $eventName, EventDispatcherInterface $dispatcher)

Parameters

Event $event
$eventName
EventDispatcherInterface $dispatcher

at line 282
testFreePostage( OrderEvent $event)

Parameters

OrderEvent $event

at line 302
afterOrder( OrderEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Parameters

OrderEvent $event
$eventName
EventDispatcherInterface $dispatcher

Exceptions

Exception if something goes wrong.

at line 384
static getSubscribedEvents()

{@inheritdoc}