| @@ 1301-1308 (lines=8) @@ | ||
| 1298 | * @param array $data |
|
| 1299 | * @return \Zend\View\Model\JsonModel |
|
| 1300 | */ |
|
| 1301 | protected function successJson($data = null) |
|
| 1302 | { |
|
| 1303 | $model = new JsonModel(array( |
|
| 1304 | 'success' => true, |
|
| 1305 | 'data' => $data |
|
| 1306 | )); |
|
| 1307 | return $model->setTerminal(true); |
|
| 1308 | } |
|
| 1309 | ||
| 1310 | /** |
|
| 1311 | * return ajax response in json format |
|
| @@ 1316-1323 (lines=8) @@ | ||
| 1313 | * @param string $message |
|
| 1314 | * @return \Zend\View\Model\JsonModel |
|
| 1315 | */ |
|
| 1316 | protected function errorJson($message = null) |
|
| 1317 | { |
|
| 1318 | $model = new JsonModel(array( |
|
| 1319 | 'success' => false, |
|
| 1320 | 'message' => $message |
|
| 1321 | )); |
|
| 1322 | return $model->setTerminal(true); |
|
| 1323 | } |
|
| 1324 | ||
| 1325 | /** |
|
| 1326 | * @param string $helperName |
|