| @@ 1585-1592 (lines=8) @@ | ||
| 1582 | * @param array $data |
|
| 1583 | * @return \Zend\View\Model\JsonModel |
|
| 1584 | */ |
|
| 1585 | protected function successJson($data = null) |
|
| 1586 | { |
|
| 1587 | $model = new JsonModel(array( |
|
| 1588 | 'success' => true, |
|
| 1589 | 'data' => $data, |
|
| 1590 | )); |
|
| 1591 | return $model->setTerminal(true); |
|
| 1592 | } |
|
| 1593 | ||
| 1594 | /** |
|
| 1595 | * return ajax response in json format |
|
| @@ 1600-1607 (lines=8) @@ | ||
| 1597 | * @param string $message |
|
| 1598 | * @return \Zend\View\Model\JsonModel |
|
| 1599 | */ |
|
| 1600 | protected function errorJson($message = null) |
|
| 1601 | { |
|
| 1602 | $model = new JsonModel(array( |
|
| 1603 | 'success' => false, |
|
| 1604 | 'message' => $message, |
|
| 1605 | )); |
|
| 1606 | return $model->setTerminal(true); |
|
| 1607 | } |
|
| 1608 | ||
| 1609 | /** |
|
| 1610 | * @param string $helperName |
|