EcommerceBundle/Controller/ContractController.php
public function actorlistJsonAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $actor = $em->getRepository('CoreBundle:Actor')->find($id);

        if (!$actor) {
            throw $this->createNotFoundException('Unable to find Actor entity.');
        }
        
        /** @var \AdminBundle\Services\DataTables\JsonList $jsonList */
        $jsonList = $this->get('json_list');
        $jsonList->setRepository($em->getRepository('EcommerceBundle:Contract'));
        $jsonList->setActor($actor);
        $response = $jsonList->get();

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

        $actor = $em->getRepository('CoreBundle:Actor')->find($id);

        if (!$actor) {
            throw $this->createNotFoundException('Unable to find Actor entity.');
        }
        
        /** @var \AdminBundle\Services\DataTables\JsonList $jsonList */
        $jsonList = $this->get('json_list');
        $jsonList->setRepository($em->getRepository('EcommerceBundle:Contract'));
        $jsonList->setActor($actor);
        $response = $jsonList->get();

        return new JsonResponse($response);
    }
public function actorlistJsonAction ( $ id ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ actor = $ em -> getRepository ( 'CoreBundle:Actor' ) -> find ( $ id ) ; if ( ! $ actor ) { throw $ this -> createNotFoundException ( 'Unable to find Actor entity.' ) ; } /** @var \AdminBundle\Services\DataTables\JsonList $jsonList */ $ jsonList = $ this -> get ( 'json_list' ) ; $ jsonList -> setRepository ( $ em -> getRepository ( 'EcommerceBundle:Contract' ) ) ; $ jsonList -> setActor ( $ actor ) ; $ response = $ jsonList -> get ( ) ; return new JsonResponse ( $ response ) ; }
Returns a list of Brand entities in JSON format.

@return JsonResponse

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