| @@ 1419-1426 (lines=8) @@ | ||
| 1416 | * @param array $data |
|
| 1417 | * @return \Zend\View\Model\JsonModel |
|
| 1418 | */ |
|
| 1419 | protected function successJson($data = null) { |
|
| 1420 | $model = new JsonModel(array( |
|
| 1421 | 'success' => true, |
|
| 1422 | 'data' => $data, |
|
| 1423 | )); |
|
| 1424 | return $model->setTerminal(true); |
|
| 1425 | } |
|
| 1426 | ||
| 1427 | /** |
|
| 1428 | * return ajax response in json format |
|
| 1429 | * |
|
| @@ 1433-1440 (lines=8) @@ | ||
| 1430 | * @param string $message |
|
| 1431 | * @return \Zend\View\Model\JsonModel |
|
| 1432 | */ |
|
| 1433 | protected function errorJson($message = null) { |
|
| 1434 | $model = new JsonModel(array( |
|
| 1435 | 'success' => false, |
|
| 1436 | 'message' => $message, |
|
| 1437 | )); |
|
| 1438 | return $model->setTerminal(true); |
|
| 1439 | } |
|
| 1440 | ||
| 1441 | /** |
|
| 1442 | * @param string $helperName |
|
| 1443 | */ |
|