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