1 <?php
2
3 namespace Balance\Mvc\Controller;
4
5 use Zend\Mvc\Controller\AbstractActionController;
6 use Zend\View\Model\JsonModel;
7
8 9 10
11 class Accounts extends AbstractActionController implements ModelAwareInterface, RedirectRouteNameAwareInterface
12 {
13
14 use ModelAwareTrait;
15 use RedirectRouteNameAwareTrait;
16
17 use IndexActionTrait;
18 use EditActionTrait;
19 use RemoveActionTrait;
20
21 22 23 24 25
26 public function orderAction()
27 {
28
29 $pAccounts = $this->getServiceLocator()->get('Balance\Model\Persistence\Accounts');
30
31 $pAccounts->order($this->getRequest()->getPost());
32
33 return new JsonModel(array(
34 array(
35 'type' => 'success',
36 'message' => 'Ordenação de elementos efetuada com sucesso.',
37 'payload' => array(),
38 ),
39 ));
40 }
41 }
42