| @@ 1188-1195 (lines=8) @@ | ||
| 1185 | * @param array $data |
|
| 1186 | * @return \Zend\View\Model\JsonModel |
|
| 1187 | */ |
|
| 1188 | protected function successJson($data = null) |
|
| 1189 | { |
|
| 1190 | $model = new JsonModel(array( |
|
| 1191 | 'success' => true, |
|
| 1192 | 'data' => $data |
|
| 1193 | )); |
|
| 1194 | return $model->setTerminal(true); |
|
| 1195 | } |
|
| 1196 | ||
| 1197 | /** |
|
| 1198 | * return ajax response in json format |
|
| @@ 1203-1210 (lines=8) @@ | ||
| 1200 | * @param string $message |
|
| 1201 | * @return \Zend\View\Model\JsonModel |
|
| 1202 | */ |
|
| 1203 | protected function errorJson($message = null) |
|
| 1204 | { |
|
| 1205 | $model = new JsonModel(array( |
|
| 1206 | 'success' => false, |
|
| 1207 | 'message' => $message |
|
| 1208 | )); |
|
| 1209 | return $model->setTerminal(true); |
|
| 1210 | } |
|
| 1211 | ||
| 1212 | /** |
|
| 1213 | * @param string $helperName |
|