refactor cart events
This commit is contained in:
@@ -25,7 +25,7 @@ namespace Thelia\Action;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Thelia\Core\Event\CartEvent;
|
||||
use Thelia\Core\Event\Cart\CartEvent;
|
||||
use Thelia\Model\ProductPrice;
|
||||
use Thelia\Model\ProductPriceQuery;
|
||||
use Thelia\Model\CartItem;
|
||||
@@ -45,7 +45,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
||||
/**
|
||||
*
|
||||
* add an article in the current cart
|
||||
* @param \Thelia\Core\Event\CartEvent $event
|
||||
* @param \Thelia\Core\Event\Cart\CartEvent $event
|
||||
*/
|
||||
public function addItem(CartEvent $event)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
||||
*
|
||||
* Delete specify article present into cart
|
||||
*
|
||||
* @param \Thelia\Core\Event\CartEvent $event
|
||||
* @param \Thelia\Core\Event\Cart\CartEvent $event
|
||||
*/
|
||||
public function deleteItem(CartEvent $event)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
||||
*
|
||||
* don't use Form here just test the Request.
|
||||
*
|
||||
* @param \Thelia\Core\Event\CartEvent $event
|
||||
* @param \Thelia\Core\Event\Cart\CartEvent $event
|
||||
*/
|
||||
public function changeItem(CartEvent $event)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ use Thelia\Model\Customer;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Thelia\Core\HttpFoundation\Session\Session;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Core\Event\CartEvent;
|
||||
use Thelia\Core\Event\Cart\CartEvent;
|
||||
|
||||
/**
|
||||
* managed cart
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Thelia\Controller\Front;
|
||||
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Form\Exception\FormValidationException;
|
||||
use Thelia\Core\Event\CartEvent;
|
||||
use Thelia\Core\Event\Cart\CartEvent;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Thelia\Form\CartAdd;
|
||||
@@ -102,7 +102,7 @@ class CartController extends BaseFrontController
|
||||
/**
|
||||
* use Thelia\Cart\CartTrait for searching current cart or create a new one
|
||||
*
|
||||
* @return CartEvent
|
||||
* @return \Thelia\Core\Event\Cart\CartEvent
|
||||
*/
|
||||
protected function getCartEvent()
|
||||
{
|
||||
|
||||
@@ -21,9 +21,10 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Cart;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
use Thelia\Model\Cart;
|
||||
|
||||
class CartEvent extends ActionEvent
|
||||
@@ -21,8 +21,9 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Cart;
|
||||
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
use Thelia\Model\CartItem;
|
||||
|
||||
class CartItemEvent extends ActionEvent
|
||||
@@ -7,7 +7,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Model\Base\CartItem as BaseCartItem;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Core\Event\CartEvent;
|
||||
use Thelia\Core\Event\Cart\CartEvent;
|
||||
use Thelia\TaxEngine\Calculator;
|
||||
|
||||
class CartItem extends BaseCartItem
|
||||
|
||||
Reference in New Issue
Block a user