PHP Класс Elcodi\Store\CartBundle\Controller\CartController

Наследование: extends Symfony\Bundle\FrameworkBundle\Controller\Controller, use trait Elcodi\Store\CoreBundle\Controller\Traits\TemplateRenderTrait
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

addPurchasableAction() публичный Метод

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
Результат Symfony\Component\HttpFoundation\Response Redirect response

emptyCartAction() публичный Метод

Empty Cart
public emptyCartAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : RedirectResponse
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
Результат Symfony\Component\HttpFoundation\RedirectResponse

navAction() публичный Метод

reduced version of cart
public navAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : Response
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
Результат Symfony\Component\HttpFoundation\Response Response

relatedAction() публичный Метод

Purchasable related view
public relatedAction ( Elcodi\Component\Cart\Entity\Interfaces\CartInterface $cart ) : array
$cart Elcodi\Component\Cart\Entity\Interfaces\CartInterface Cart
Результат array

removeCartLineAction() публичный Метод

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
Результат Symfony\Component\HttpFoundation\RedirectResponse

updateCartAction() публичный Метод

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
Результат Symfony\Component\HttpFoundation\RedirectResponse

viewAction() публичный Метод

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
Результат Symfony\Component\HttpFoundation\Response Response