Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. public function index() {
  2. $this->layout = 'admin';
  3.  
  4. if(isset($this->request->params['named']['search'])) {
  5. $this->request->params['named']['search'] = trim($this->request->params['named']['search']);
  6. }
  7.  
  8. $this->Prg->commonProcess();
  9. $query = $this->Prg->parsedParams();
  10.  
  11. $this->Order->contain('User', 'OrderProduct', 'OrderSignature');
  12. $this->Paginator->settings['order'] = "Order.created DESC";
  13. $this->Paginator->settings['conditions'] = $this->Order->parseCriteria($query);
  14. $this->Paginator->settings['group'] = array('Order.id');
  15.  
  16. $orders = $this->Paginator->paginate();
  17.  
  18. $this->set(compact('orders'));
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement