Cart
class Cart extends BaseAction implements EventSubscriberInterface
Class Cart where all actions are manage like adding, modifying or delete items.
Class Cart
Methods
Toggle visibility for an object
No description
No description
add an article in the current cart
Delete specify article present into cart
Clear the cart
Modify article's quantity
No description
Refresh article's price
Find a specific record in CartItem table using the current CartEvent
Search if cart already exists in session. If not try to restore it from the cart cookie, or duplicate an old one.
Create a new, empty cart object, and assign it to the current customer, if any.
{@inheritdoc}
Details
        in 
    BaseAction at line 130
                            
    mixed
    genericToggleVisibility(
    ModelCriteria $query, 
    ToggleVisibilityEvent $event, 
    EventDispatcherInterface $dispatcher = null)
    
    Toggle visibility for an object
        at line 54
                            
    
    __construct(
    RequestStack $requestStack, 
    TokenProvider $tokenProvider)
    
    
        at line 61
                            
    
    persistCart(
    CartPersistEvent $event)
    
    
        at line 80
                            
    
    addItem(
    CartEvent $event, $eventName, 
    EventDispatcherInterface $dispatcher)
    
    add an article in the current cart
        at line 128
                            
    
    deleteItem(
    CartEvent $event)
    
    Delete specify article present into cart
        at line 143
                            
    
    clear(
    CartEvent $event)
    
    Clear the cart
        at line 160
                            
    
    changeItem(
    CartEvent $event, $eventName, 
    EventDispatcherInterface $dispatcher)
    
    Modify article's quantity
don't use Form here just test the Request.
        at line 178
                            
    
    updateCart(
    CurrencyChangeEvent $event, $eventName, 
    EventDispatcherInterface $dispatcher)
    
    
        at line 194
                            
    
    updateCartPrices(
    Cart $cart, 
    Currency $currency)
    
    Refresh article's price
        at line 302
                            
    
    findCartItem(
    CartEvent $event)
    
    Find a specific record in CartItem table using the current CartEvent
        at line 321
                            
    
    restoreCurrentCart(
    CartRestoreEvent $cartRestoreEvent, $eventName, 
    EventDispatcherInterface $dispatcher)
    
    Search if cart already exists in session. If not try to restore it from the cart cookie, or duplicate an old one.
        at line 448
                            
    
    createEmptyCart(
    CartCreateEvent $cartCreateEvent)
    
    Create a new, empty cart object, and assign it to the current customer, if any.
        at line 514
                static            
    
    getSubscribedEvents()
    
    {@inheritdoc}