| @@ 1472-1479 (lines=8) @@ | ||
| 1469 | * @param array $data |
|
| 1470 | * @return \Zend\View\Model\JsonModel |
|
| 1471 | */ |
|
| 1472 | protected function successJson($data = null) |
|
| 1473 | { |
|
| 1474 | $model = new JsonModel(array( |
|
| 1475 | 'success' => true, |
|
| 1476 | 'data' => $data, |
|
| 1477 | )); |
|
| 1478 | return $model->setTerminal(true); |
|
| 1479 | } |
|
| 1480 | ||
| 1481 | /** |
|
| 1482 | * return ajax response in json format |
|
| @@ 1487-1494 (lines=8) @@ | ||
| 1484 | * @param string $message |
|
| 1485 | * @return \Zend\View\Model\JsonModel |
|
| 1486 | */ |
|
| 1487 | protected function errorJson($message = null) |
|
| 1488 | { |
|
| 1489 | $model = new JsonModel(array( |
|
| 1490 | 'success' => false, |
|
| 1491 | 'message' => $message, |
|
| 1492 | )); |
|
| 1493 | return $model->setTerminal(true); |
|
| 1494 | } |
|
| 1495 | ||
| 1496 | /** |
|
| 1497 | * @param string $helperName |
|