| @@ 1336-1343 (lines=8) @@ | ||
| 1333 | * @param array $data |
|
| 1334 | * @return \Zend\View\Model\JsonModel |
|
| 1335 | */ |
|
| 1336 | protected function successJson($data = null) |
|
| 1337 | { |
|
| 1338 | $model = new JsonModel(array( |
|
| 1339 | 'success' => true, |
|
| 1340 | 'data' => $data |
|
| 1341 | )); |
|
| 1342 | return $model->setTerminal(true); |
|
| 1343 | } |
|
| 1344 | ||
| 1345 | /** |
|
| 1346 | * return ajax response in json format |
|
| @@ 1351-1358 (lines=8) @@ | ||
| 1348 | * @param string $message |
|
| 1349 | * @return \Zend\View\Model\JsonModel |
|
| 1350 | */ |
|
| 1351 | protected function errorJson($message = null) |
|
| 1352 | { |
|
| 1353 | $model = new JsonModel(array( |
|
| 1354 | 'success' => false, |
|
| 1355 | 'message' => $message |
|
| 1356 | )); |
|
| 1357 | return $model->setTerminal(true); |
|
| 1358 | } |
|
| 1359 | ||
| 1360 | /** |
|
| 1361 | * @param string $helperName |
|