| @@ 1432-1439 (lines=8) @@ | ||
| 1429 | * @param array $data | |
| 1430 | * @return \Zend\View\Model\JsonModel | |
| 1431 | */ | |
| 1432 | protected function successJson($data = null) | |
| 1433 |     { | |
| 1434 | $model = new JsonModel(array( | |
| 1435 | 'success' => true, | |
| 1436 | 'data' => $data | |
| 1437 | )); | |
| 1438 | return $model->setTerminal(true); | |
| 1439 | } | |
| 1440 | ||
| 1441 | /** | |
| 1442 | * return ajax response in json format | |
| @@ 1447-1454 (lines=8) @@ | ||
| 1444 | * @param string $message | |
| 1445 | * @return \Zend\View\Model\JsonModel | |
| 1446 | */ | |
| 1447 | protected function errorJson($message = null) | |
| 1448 |     { | |
| 1449 | $model = new JsonModel(array( | |
| 1450 | 'success' => false, | |
| 1451 | 'message' => $message | |
| 1452 | )); | |
| 1453 | return $model->setTerminal(true); | |
| 1454 | } | |
| 1455 | ||
| 1456 | /** | |
| 1457 | * @param string $helperName | |