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