| @@ 1596-1603 (lines=8) @@ | ||
| 1593 | * @param array $data |
|
| 1594 | * @return \Zend\View\Model\JsonModel |
|
| 1595 | */ |
|
| 1596 | protected function successJson($data = null) |
|
| 1597 | { |
|
| 1598 | $model = new JsonModel(array( |
|
| 1599 | 'success' => true, |
|
| 1600 | 'data' => $data, |
|
| 1601 | )); |
|
| 1602 | return $model->setTerminal(true); |
|
| 1603 | } |
|
| 1604 | ||
| 1605 | /** |
|
| 1606 | * return ajax response in json format |
|
| @@ 1611-1618 (lines=8) @@ | ||
| 1608 | * @param string $message |
|
| 1609 | * @return \Zend\View\Model\JsonModel |
|
| 1610 | */ |
|
| 1611 | protected function errorJson($message = null) |
|
| 1612 | { |
|
| 1613 | $model = new JsonModel(array( |
|
| 1614 | 'success' => false, |
|
| 1615 | 'message' => $message, |
|
| 1616 | )); |
|
| 1617 | return $model->setTerminal(true); |
|
| 1618 | } |
|
| 1619 | ||
| 1620 | /** |
|
| 1621 | * @param string $helperName |
|