| @@ 1320-1327 (lines=8) @@ | ||
| 1317 | * @param array $data |
|
| 1318 | * @return \Zend\View\Model\JsonModel |
|
| 1319 | */ |
|
| 1320 | protected function successJson($data = null) |
|
| 1321 | { |
|
| 1322 | $model = new JsonModel(array( |
|
| 1323 | 'success' => true, |
|
| 1324 | 'data' => $data |
|
| 1325 | )); |
|
| 1326 | return $model->setTerminal(true); |
|
| 1327 | } |
|
| 1328 | ||
| 1329 | /** |
|
| 1330 | * return ajax response in json format |
|
| @@ 1335-1342 (lines=8) @@ | ||
| 1332 | * @param string $message |
|
| 1333 | * @return \Zend\View\Model\JsonModel |
|
| 1334 | */ |
|
| 1335 | protected function errorJson($message = null) |
|
| 1336 | { |
|
| 1337 | $model = new JsonModel(array( |
|
| 1338 | 'success' => false, |
|
| 1339 | 'message' => $message |
|
| 1340 | )); |
|
| 1341 | return $model->setTerminal(true); |
|
| 1342 | } |
|
| 1343 | ||
| 1344 | /** |
|
| 1345 | * @param string $helperName |
|