| @@ 1086-1093 (lines=8) @@ | ||
| 1083 | * @param array $data |
|
| 1084 | * @return \Zend\View\Model\JsonModel |
|
| 1085 | */ |
|
| 1086 | protected function successJson($data = null) |
|
| 1087 | { |
|
| 1088 | $model = new JsonModel(array( |
|
| 1089 | 'success' => true, |
|
| 1090 | 'data' => $data |
|
| 1091 | )); |
|
| 1092 | return $model->setTerminal(true); |
|
| 1093 | } |
|
| 1094 | ||
| 1095 | /** |
|
| 1096 | * return ajax response in json format |
|
| @@ 1101-1108 (lines=8) @@ | ||
| 1098 | * @param string $message |
|
| 1099 | * @return \Zend\View\Model\JsonModel |
|
| 1100 | */ |
|
| 1101 | protected function errorJson($message = null) |
|
| 1102 | { |
|
| 1103 | $model = new JsonModel(array( |
|
| 1104 | 'success' => false, |
|
| 1105 | 'message' => $message |
|
| 1106 | )); |
|
| 1107 | return $model->setTerminal(true); |
|
| 1108 | } |
|
| 1109 | ||
| 1110 | /** |
|
| 1111 | * @param string $helperName |
|