PHP Class Elcodi\Store\CartBundle\Controller\CartController

Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller, use trait Elcodi\Store\CoreBundle\Controller\Traits\TemplateRenderTrait
ファイルを表示 Open project: elcodi/bamboo

Public Methods

Method 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 method

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
return Symfony\Component\HttpFoundation\Response Redirect response

emptyCartAction() public method

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

navAction() public method

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

relatedAction() public method

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

removeCartLineAction() public method

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
return Symfony\Component\HttpFoundation\RedirectResponse

updateCartAction() public method

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
return Symfony\Component\HttpFoundation\RedirectResponse

viewAction() public method

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
return Symfony\Component\HttpFoundation\Response Response