src/Graviton/RestBundle/Controller/RestController.php
public function allAction(Request $request)
    {
        $model = $this->getModel();

        $content = $this->restUtils->serialize($model->findAll($request));

        $response = $this->getResponse()
            ->setStatusCode(Response::HTTP_OK)
            ->setContent($content);

        return $response;
    }
public function allAction(Request $request)
    {
        $model = $this->getModel();

        $content = $this->restUtils->serialize($model->findAll($request));

        $response = $this->getResponse()
            ->setStatusCode(Response::HTTP_OK)
            ->setContent($content);

        return $response;
    }
public function allAction ( Request $ request ) { $ model = $ this -> getModel ( ) ; $ content = $ this -> restUtils -> serialize ( $ model -> findAll ( $ request ) ) ; $ response = $ this -> getResponse ( ) -> setStatusCode ( Response :: HTTP_OK ) -> setContent ( $ content ) ; return $ response ; }
Returns all records

@param Request $request Current http request

@return \Symfony\Component\HttpFoundation\Response $response Response with result or error
Returns all records