public function addTariffPrivateNgAction() { $em = $this->getDoctrine()->getManager(); $data = json_decode(file_get_contents("php://input")); $parameters = (object) $data; $tariff = Tariff::addTariffPrivate($em, $this->getUser(), $parameters); $response = new Response(json_encode(array("result" => $tariff->getInArray()))); $response->headers->set('Content-Type', 'application/json'); return $response; }