refactor name for updating actions

This commit is contained in:
Manuel Raynaud
2013-09-04 10:48:59 +02:00
parent b9a7030d90
commit d23190303c
20 changed files with 49 additions and 48 deletions

View File

@@ -227,7 +227,7 @@ class Category extends BaseAction implements EventSubscriberInterface
$categoryEvent = new CategoryEvent($category);
$event->getDispatcher()->dispatch(TheliaEvents::AFTER_CHANGECATEGORY, $categoryEvent);
$event->getDispatcher()->dispatch(TheliaEvents::AFTER_UPDATECATEGORY, $categoryEvent);
}
}

View File

@@ -74,7 +74,7 @@ class CartController extends BaseFrontController
$cartEvent->setQuantity($this->getRequest()->get("quantity"));
try {
$this->getDispatcher()->dispatch(TheliaEvents::CART_CHANGEITEM, $cartEvent);
$this->getDispatcher()->dispatch(TheliaEvents::CART_UPDATEITEM, $cartEvent);
$this->redirectSuccess();
} catch(PropelException $e) {

View File

@@ -106,7 +106,7 @@ final class TheliaEvents
/**
* Sent just after a successful change of a category in the database.
*/
const AFTER_CHANGECATEGORY = "action.after_changecategory";
const AFTER_UPDATECATEGORY = "action.after_changecategory";
/**
* sent when a new existing cat id duplicated. This append when current customer is different from current cart
@@ -121,7 +121,7 @@ final class TheliaEvents
/**
* sent when a cart item is modify
*/
const AFTER_CARTCHANGEITEM = "cart.modifyItem";
const AFTER_CARTUPDATEITEM = "cart.modifyItem";
/**
* sent for addArticle action
@@ -131,7 +131,7 @@ final class TheliaEvents
/**
* sent on modify article action
*/
const CART_CHANGEITEM = "action.changeArticle";
const CART_UPDATEITEM = "action.changeArticle";
const CART_DELETEITEM = "action.deleteArticle";
}

View File

@@ -32,7 +32,7 @@ class CartItem extends BaseCartItem
if ($this->dispatcher) {
$cartEvent = new CartEvent($this->getCart());
$this->dispatcher->dispatch(TheliaEvents::AFTER_CARTCHANGEITEM, $cartEvent);
$this->dispatcher->dispatch(TheliaEvents::AFTER_CARTUPDATEITEM, $cartEvent);
}
}