$dispatcher
$dispatcher : \Symfony\Component\EventDispatcher\EventDispatcherInterface
Class Cart where all actions are manage like adding, modifying or delete items.
Class Cart
addArticle(\Thelia\Core\Event\ActionEvent $event)
add an article to cart
| \Thelia\Core\Event\ActionEvent | $event |
deleteArticle(\Thelia\Core\Event\ActionEvent $event)
Delete specify article present into cart
| \Thelia\Core\Event\ActionEvent | $event |
modifyArticle(\Thelia\Core\Event\ActionEvent $event)
Modify article's quantity
don't use Form here just test the Request.
| \Thelia\Core\Event\ActionEvent | $event |
getSubscribedEvents() : array
Returns an array of event names this subscriber wants to listen to.
The array keys are event names and the value can be:
For instance:
The event names to listen to
updateQuantity(\Thelia\Model\CartItem $cartItem, $quantity)
| \Thelia\Model\CartItem | $cartItem | |
| $quantity |
addItem(\Thelia\Model\Cart $cart, $productId, $productSaleElementsId, $quantity, \Thelia\Model\ProductPrice $productPrice)
| \Thelia\Model\Cart | $cart | |
| $productId | ||
| $productSaleElementsId | ||
| $quantity | ||
| \Thelia\Model\ProductPrice | $productPrice |
validateForm(\Thelia\Form\BaseForm $aBaseForm, $expectedMethod)
| \Thelia\Form\BaseForm | $aBaseForm | |
| $expectedMethod |
propagateFormError(\Thelia\Form\BaseForm $aBaseForm, string $error_message, \Thelia\Core\Event\ActionEvent $event)
| \Thelia\Form\BaseForm | $aBaseForm | |
| string | $error_message | |
| \Thelia\Core\Event\ActionEvent | $event |