public function dispatchCartCouponOnApplyEvent(
        CartInterface $cart,
        CouponInterface $coupon
    ) {
        $event = new CartCouponOnApplyEvent($cart, $coupon);
        $this->eventDispatcher->dispatch(
            ElcodiCartCouponEvents::CART_COUPON_ONAPPLY,
            $event
        );
    }
public function dispatchCartCouponOnApplyEvent(
        CartInterface $cart,
        CouponInterface $coupon
    ) {
        $event = new CartCouponOnApplyEvent($cart, $coupon);
        $this->eventDispatcher->dispatch(
            ElcodiCartCouponEvents::CART_COUPON_ONAPPLY,
            $event
        );
    }
public function dispatchCartCouponOnApplyEvent ( CartInterface $ cart , CouponInterface $ coupon ) { $ event = new CartCouponOnApplyEvent ( $ cart , $ coupon ) ; $ this -> eventDispatcher -> dispatch ( ElcodiCartCouponEvents :: CART_COUPON_ONAPPLY , $ event ) ; }
Dispatch event just before a coupon is applied into a Cart.

@param CartInterface   $cart   Cart where to apply the coupon
@param CouponInterface $coupon Coupon to be applied

@return $this Self object
Dispatch event just before a coupon is applied into a Cart .