EcommerceBundle/Controller/FeatureController.php
public function toggleFiltrableAction(Request $request, $id)
    {
        if (false === $request->isXmlHttpRequest()) {
            throw $this->createNotFoundException();
        }

        $isFiltrable = $this->get('admin_manager')->toggleFiltrable('EcommerceBundle:Feature', $id);

        return new Response(intval($isFiltrable), 200);
    }
public function toggleFiltrableAction(Request $request, $id)
    {
        if (false === $request->isXmlHttpRequest()) {
            throw $this->createNotFoundException();
        }

        $isFiltrable = $this->get('admin_manager')->toggleFiltrable('EcommerceBundle:Feature', $id);

        return new Response(intval($isFiltrable), 200);
    }
public function toggleFiltrableAction ( Request $ request , $ id ) { if ( false === $ request -> isXmlHttpRequest ( ) ) { throw $ this -> createNotFoundException ( ) ; } $ isFiltrable = $ this -> get ( 'admin_manager' ) -> toggleFiltrable ( 'EcommerceBundle:Feature' , $ id ) ; return new Response ( intval ( $ isFiltrable ) , 200 ) ; }
Set a list of features as filtrable.

@param Request $request
@param int     $id

@throws NotFoundHttpException
@return Response

@Route("/{id}/toggle-filtrable")
@Method("POST")
@Template
Set a list of features as filtrable .