public function setLabTestAction() { $params = $this->_getParam('labTest'); $labTest = new LabTest(); if (isset($params['labTestId'])) { $labTest->labTestId = (int) $params['labTestId']; $labTest->populate(); } $labTest->populateWithArray($params); $labTest->persist(); $data = __('Lab test successfully set.'); $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json'); $json->suppressExit = true; $json->direct($data); }