EcommerceBundle/Controller/InvoiceController.php
public function listJsonAction()
    {
        $em = $this->getDoctrine()->getManager();

        /** @var \Kitchenit\AdminBundle\Services\DataTables\JsonList $jsonList */
        $jsonList = $this->get('json_list');
        $jsonList->setRepository($em->getRepository('EcommerceBundle:Invoice'));

        $response = $jsonList->get();

        return new JsonResponse($response);
    }
public function listJsonAction()
    {
        $em = $this->getDoctrine()->getManager();

        /** @var \Kitchenit\AdminBundle\Services\DataTables\JsonList $jsonList */
        $jsonList = $this->get('json_list');
        $jsonList->setRepository($em->getRepository('EcommerceBundle:Invoice'));

        $response = $jsonList->get();

        return new JsonResponse($response);
    }
public function listJsonAction ( ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; /** @var \Kitchenit\AdminBundle\Services\DataTables\JsonList $jsonList */ $ jsonList = $ this -> get ( 'json_list' ) ; $ jsonList -> setRepository ( $ em -> getRepository ( 'EcommerceBundle:Invoice' ) ) ; $ response = $ jsonList -> get ( ) ; return new JsonResponse ( $ response ) ; }
Returns a list of Invoice entities in JSON format.

@return JsonResponse

@Route("/list.{_format}", requirements={ "_format" = "json" }, defaults={ "_format" = "json" })
@Method("GET")
Returns a list of Invoice entities in JSON format .