CakePHP 2.x User Management Premium Plugin Version 2.4.x
How to use sorting in plugin and outside plugin
1. Set pagination variable in your controller e.g. in UsersController.phppublic $paginate = ['limit'=>25];
2. Now in controller's action you should get results from database in following way e.g. in index function$this->paginate = ['limit'=>10, 'order'=>['User.id'=>'DESC']];
$users = $this->paginate('User');
$this->set(compact('users'));
3. Now in template file should use table headers in following way<th><?php echo $this->Paginator->sort('Users.first_name', __('Name'));?></th>
Now this table column for Name becomes sort-able
For more information see
Users Controller yourapp/app/Plugin/Usermgmt/Controller/UsersController.php
Index View yourapp/app/Plugin/Usermgmt/View/Users/index.php
Index View yourapp/app/Plugin/Usermgmt/View/Users/all_users.php