PHP Class Elcodi\Store\CartBundle\Controller\CartController

Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller, use trait Elcodi\Store\CoreBundle\Controller\Traits\TemplateRenderTrait
Afficher le fichier Open project: elcodi/bamboo

Méthodes publiques

Méthode Description
addPurchasableAction ( Request $request, Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, integer $id ) : Response Adds product into cart
emptyCartAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : RedirectResponse Empty Cart
navAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : Response reduced version of cart
relatedAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : array Purchasable related view
removeCartLineAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, Elcodi\Component\Cart\Entity\Interfaces\CartLineInterface $cartLine ) : RedirectResponse Deletes CartLine
updateCartAction ( Symfony\Component\Form\FormInterface $form, Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, boolean $isValid ) : RedirectResponse Update Cart
viewAction ( Symfony\Component\Form\FormView $formView, Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : Response Cart view

Method Details

addPurchasableAction() public méthode

Adds product into cart
public addPurchasableAction ( Request $request, Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, integer $id ) : Response
$request Symfony\Component\HttpFoundation\Request Request object
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
$id integer Purchasable Id
Résultat Symfony\Component\HttpFoundation\Response Redirect response

emptyCartAction() public méthode

Empty Cart
public emptyCartAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : RedirectResponse
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
Résultat Symfony\Component\HttpFoundation\RedirectResponse

navAction() public méthode

reduced version of cart
public navAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : Response
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
Résultat Symfony\Component\HttpFoundation\Response Response

relatedAction() public méthode

Purchasable related view
public relatedAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : array
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
Résultat array

removeCartLineAction() public méthode

Deletes CartLine
public removeCartLineAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, Elcodi\Component\Cart\Entity\Interfaces\CartLineInterface $cartLine ) : RedirectResponse
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
$cartLine Elcodi\Component\Cart\Entity\Interfaces\CartLineInterface Cart Line
Résultat Symfony\Component\HttpFoundation\RedirectResponse

updateCartAction() public méthode

Update Cart
public updateCartAction ( Symfony\Component\Form\FormInterface $form, Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart, boolean $isValid ) : RedirectResponse
$form Symfony\Component\Form\FormInterface Form
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
$isValid boolean Form is valid
Résultat Symfony\Component\HttpFoundation\RedirectResponse

viewAction() public méthode

Cart view
public viewAction ( Symfony\Component\Form\FormView $formView, Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : Response
$formView Symfony\Component\Form\FormView Form view
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
Résultat Symfony\Component\HttpFoundation\Response Response