PHP Class Sonata\ProductBundle\Controller\ProductController

Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
Show file Open project: sonata-project/ecommerce

Public Methods

Method Description
getPriceStockForQuantityAction ( $productId ) : Symfony\Component\HttpFoundation\JsonResponse Returns price for $productId in given quantity and stock information as JSON.
renderFinalReviewBasketElementAction ( Sonata\Component\Basket\BasketElementInterface $basketElement, Sonata\Component\Basket\BasketInterface $basket ) : Response
renderFormBasketElementAction ( Symfony\Component\Form\FormView $formView, Sonata\Component\Basket\BasketElementInterface $basketElement, Sonata\Component\Basket\BasketInterface $basket ) : Response
variationToProductAction ( $productId, $slug ) : Response
viewAction ( $productId, $slug ) : Response
viewVariationsAction ( $productId, $slug ) : Response

Method Details

getPriceStockForQuantityAction() public method

Returns price for $productId in given quantity and stock information as JSON.
public getPriceStockForQuantityAction ( $productId ) : Symfony\Component\HttpFoundation\JsonResponse
$productId
return Symfony\Component\HttpFoundation\JsonResponse

renderFinalReviewBasketElementAction() public method

public renderFinalReviewBasketElementAction ( Sonata\Component\Basket\BasketElementInterface $basketElement, Sonata\Component\Basket\BasketInterface $basket ) : Response
$basketElement Sonata\Component\Basket\BasketElementInterface
$basket Sonata\Component\Basket\BasketInterface
return Symfony\Component\HttpFoundation\Response

renderFormBasketElementAction() public method

public renderFormBasketElementAction ( Symfony\Component\Form\FormView $formView, Sonata\Component\Basket\BasketElementInterface $basketElement, Sonata\Component\Basket\BasketInterface $basket ) : Response
$formView Symfony\Component\Form\FormView
$basketElement Sonata\Component\Basket\BasketElementInterface
$basket Sonata\Component\Basket\BasketInterface
return Symfony\Component\HttpFoundation\Response

variationToProductAction() public method

public variationToProductAction ( $productId, $slug ) : Response
$productId
$slug
return Symfony\Component\HttpFoundation\Response

viewAction() public method

public viewAction ( $productId, $slug ) : Response
$productId
$slug
return Symfony\Component\HttpFoundation\Response

viewVariationsAction() public method

public viewVariationsAction ( $productId, $slug ) : Response
$productId
$slug
return Symfony\Component\HttpFoundation\Response