public function saveLabelAction() { $re = array(); $user = $this->get('security.context')->getToken()->getUser(); $request = $this->getRequest(); $atten_id = $request->get("atten_id"); $label_names = $request->get("label_names"); $da = $this->get('we_data_access'); $conv = new \Justsy\BaseBundle\Business\Conv(); $conv->saveLabel($da, $user, $atten_id, $label_names); $re = array('success' => '1'); $response = new Response(json_encode($re)); $response->headers->set('Content-Type', 'text/json'); return $response; }