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