PHP Class Elcodi\Store\CartBundle\EventListener\ShippingApplianceEventListener

Exibir arquivo Open project: elcodi/bamboo

Public Methods

Method Description
__construct ( Elcodi\Component\Cart\EventDispatcher\CartEventDispatcher $cartEventDispatcher, Elcodi\Component\Shipping\Wrapper\ShippingWrapper $shippingWrapper, Elcodi\Component\Shipping\Resolver\ShippingResolver $shippingResolver ) Construct
loadCheapestShippingMethod ( Elcodi\Component\Cart\Event\CartOnLoadEvent $event ) Loads cheapest shipping method if exists
removeInvalidShippingMethod ( Elcodi\Component\Cart\Event\CartOnLoadEvent $event ) Remove shipping method from cart if this is not valid anymore

Method Details

__construct() public method

Construct
public __construct ( Elcodi\Component\Cart\EventDispatcher\CartEventDispatcher $cartEventDispatcher, Elcodi\Component\Shipping\Wrapper\ShippingWrapper $shippingWrapper, Elcodi\Component\Shipping\Resolver\ShippingResolver $shippingResolver )
$cartEventDispatcher Elcodi\Component\Cart\EventDispatcher\CartEventDispatcher Cart Event Dispatcher
$shippingWrapper Elcodi\Component\Shipping\Wrapper\ShippingWrapper Shipping wrapper
$shippingResolver Elcodi\Component\Shipping\Resolver\ShippingResolver Shipping Method Resolver

loadCheapestShippingMethod() public method

Loads cheapest shipping method if exists
public loadCheapestShippingMethod ( Elcodi\Component\Cart\Event\CartOnLoadEvent $event )
$event Elcodi\Component\Cart\Event\CartOnLoadEvent Event

removeInvalidShippingMethod() public method

Remove shipping method from cart if this is not valid anymore
public removeInvalidShippingMethod ( Elcodi\Component\Cart\Event\CartOnLoadEvent $event )
$event Elcodi\Component\Cart\Event\CartOnLoadEvent Event