public function getServicesCalculatorNgAction() { $em = $this->getDoctrine()->getManager(); $response = new Response(json_encode(array("result" => Service::getServicesCalculator($em)))); $response->headers->set('Content-Type', 'application/json'); return $response; }