PHP Class Elcodi\Store\CartCouponBundle\EventListener\JustOneManualCouponEventListener

Author: Berny Cantos ([email protected])
Afficher le fichier Open project: elcodi/bamboo

Protected Properties

Свойство Type Description
$cartCouponRepository Elcodi\Component\CartCoupon\Repository\CartCouponRepository CartCoupon repository

Méthodes publiques

Méthode Description
__construct ( Elcodi\Component\CartCoupon\Repository\CartCouponRepository $cartCouponRepository ) Constructor
assertJustOneManualCoupon ( Elcodi\Component\CartCoupon\Event\CartCouponOnApplyEvent $event ) Avoid applying a manual coupon if another is being applied

Méthodes protégées

Méthode Description
isManual ( Elcodi\Component\Coupon\Entity\Interfaces\CouponInterface $coupon ) : boolean Check if a coupon has manual enforcement

Method Details

__construct() public méthode

Constructor
public __construct ( Elcodi\Component\CartCoupon\Repository\CartCouponRepository $cartCouponRepository )
$cartCouponRepository Elcodi\Component\CartCoupon\Repository\CartCouponRepository CartCoupon Repository

assertJustOneManualCoupon() public méthode

Avoid applying a manual coupon if another is being applied
public assertJustOneManualCoupon ( Elcodi\Component\CartCoupon\Event\CartCouponOnApplyEvent $event )
$event Elcodi\Component\CartCoupon\Event\CartCouponOnApplyEvent

isManual() protected méthode

Check if a coupon has manual enforcement
protected isManual ( Elcodi\Component\Coupon\Entity\Interfaces\CouponInterface $coupon ) : boolean
$coupon Elcodi\Component\Coupon\Entity\Interfaces\CouponInterface Coupon
Résultat boolean

Property Details

$cartCouponRepository protected_oe property

CartCoupon repository
protected CartCouponRepository,Elcodi\Component\CartCoupon\Repository $cartCouponRepository
Résultat Elcodi\Component\CartCoupon\Repository\CartCouponRepository