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