public function getEstimationsCountNgAction(Request $request) { $em = $this->getDoctrine()->getManager(); $response = new Response(json_encode(array("result" => Estimation::getEstimationsCount($em, $request->query->all())))); $response->headers->set('Content-Type', 'application/json'); return $response; }