| @@ 1627-1634 (lines=8) @@ | ||
| 1624 | * @param array $data |
|
| 1625 | * @return \Zend\View\Model\JsonModel |
|
| 1626 | */ |
|
| 1627 | protected function successJson($data = null) |
|
| 1628 | { |
|
| 1629 | $model = new JsonModel(array( |
|
| 1630 | 'success' => true, |
|
| 1631 | 'data' => $data, |
|
| 1632 | )); |
|
| 1633 | return $model->setTerminal(true); |
|
| 1634 | } |
|
| 1635 | ||
| 1636 | /** |
|
| 1637 | * return ajax response in json format |
|
| @@ 1642-1649 (lines=8) @@ | ||
| 1639 | * @param string $message |
|
| 1640 | * @return \Zend\View\Model\JsonModel |
|
| 1641 | */ |
|
| 1642 | protected function errorJson($message = null) |
|
| 1643 | { |
|
| 1644 | $model = new JsonModel(array( |
|
| 1645 | 'success' => false, |
|
| 1646 | 'message' => $message, |
|
| 1647 | )); |
|
| 1648 | return $model->setTerminal(true); |
|
| 1649 | } |
|
| 1650 | ||
| 1651 | /** |
|
| 1652 | * @param string $helperName |
|