| @@ 1559-1566 (lines=8) @@ | ||
| 1556 | * @param array $data |
|
| 1557 | * @return \Zend\View\Model\JsonModel |
|
| 1558 | */ |
|
| 1559 | protected function successJson($data = null) |
|
| 1560 | { |
|
| 1561 | $model = new JsonModel(array( |
|
| 1562 | 'success' => true, |
|
| 1563 | 'data' => $data, |
|
| 1564 | )); |
|
| 1565 | return $model->setTerminal(true); |
|
| 1566 | } |
|
| 1567 | ||
| 1568 | /** |
|
| 1569 | * return ajax response in json format |
|
| @@ 1574-1581 (lines=8) @@ | ||
| 1571 | * @param string $message |
|
| 1572 | * @return \Zend\View\Model\JsonModel |
|
| 1573 | */ |
|
| 1574 | protected function errorJson($message = null) |
|
| 1575 | { |
|
| 1576 | $model = new JsonModel(array( |
|
| 1577 | 'success' => false, |
|
| 1578 | 'message' => $message, |
|
| 1579 | )); |
|
| 1580 | return $model->setTerminal(true); |
|
| 1581 | } |
|
| 1582 | ||
| 1583 | /** |
|
| 1584 | * @param string $helperName |
|