public function viewAction($collectionId, $slug)
    {
        $collection = $this->get('sonata.classification.manager.collection')->findOneBy(['id' => $collectionId]);

        if (!$collection) {
            throw new NotFoundHttpException(sprintf('Unable to find the collection with id=%d', $collectionId));
        }

        return $this->render('SonataProductBundle:Collection:view.html.twig', [
           'collection' => $collection,
        ]);
    }
public function viewAction($collectionId, $slug)
    {
        $collection = $this->get('sonata.classification.manager.collection')->findOneBy(['id' => $collectionId]);

        if (!$collection) {
            throw new NotFoundHttpException(sprintf('Unable to find the collection with id=%d', $collectionId));
        }

        return $this->render('SonataProductBundle:Collection:view.html.twig', [
           'collection' => $collection,
        ]);
    }
public function viewAction ( $ collectionId , $ slug ) { $ collection = $ this -> get ( 'sonata.classification.manager.collection' ) -> findOneBy ( [ 'id' => $ collectionId ] ) ; if ( ! $ collection ) { throw new NotFoundHttpException ( sprintf ( 'Unable to find the collection with id=%d' , $ collectionId ) ) ; } return $ this -> render ( 'SonataProductBundle:Collection:view.html.twig' , [ 'collection' => $ collection , ] ) ; }
Display one collection.


@param $collectionId
@param $slug

@throws NotFoundHttpException

@return Response
Display one collection .