public function listProductsAction($collectionId)
    {
        $pager = $this->get('sonata.product.set.manager')
            ->getProductsByCollectionIdPager($collectionId, $this->getCurrentRequest()->get('page'));

        return $this->render('SonataProductBundle:Collection:list_products.html.twig', [
            'pager' => $pager,
        ]);
    }
public function listProductsAction($collectionId)
    {
        $pager = $this->get('sonata.product.set.manager')
            ->getProductsByCollectionIdPager($collectionId, $this->getCurrentRequest()->get('page'));

        return $this->render('SonataProductBundle:Collection:list_products.html.twig', [
            'pager' => $pager,
        ]);
    }
public function listProductsAction ( $ collectionId ) { $ pager = $ this -> get ( 'sonata.product.set.manager' ) -> getProductsByCollectionIdPager ( $ collectionId , $ this -> getCurrentRequest ( ) -> get ( 'page' ) ) ; return $ this -> render ( 'SonataProductBundle:Collection:list_products.html.twig' , [ 'pager' => $ pager , ] ) ; }
List the product related to one collection.

@param $collectionId

@return Response
List the product related to one collection .