Skip to content
Fattening up your cakephp
Failed to load latest commit information.
Controller/Component Somehow $this->Time was not initialized? May 12, 2015
Model CS fixes Apr 23, 2013
Vendor CS fixes Apr 23, 2013
LICENSE Remove whitespace [ WhitespaceBot] Oct 21, 2011


Cholesterol Plugin Version 0.1

This plugin currently only contains jqGrid components and helper.


jQuery + UI (tested on 1.7.2) -
jqGrid (tested on version 3.5.3) -

Tested with cakephp 1.3. May work with 1.2.5.

Demo of this plugin is currently available in
The demo source code can be found in

For the impatient, use the following example as a starting point:

// controllers/users_controller.php
class UsersController extends AppController {
	// add Jqgrid component and helpers in your class variables.
	var $components = array('Cholesterol.Jqgrid');
	var $helpers = array('Cholesterol.Jqgrid');

	// controllers/users_controller.php - action that displays the grid
	function list_users() {

	// Retrieve data for the grid in Json format
	function get_list_users() {
		// Perform the actual query using JqgridComponent and prepare
		// the JSON response for the grid.

// views/users/list_users.ctp
echo $jqgrid->grid('user');

// Minimal configuration required to setup jqgrid initialization
// The format of $options array follows jqgrid configuration
// NOTE: javascript blocks (eg: for event handling) needs to be enclosed
// with <script> and </script>
// If anyone has better solution for this, please let me know
echo $jqgrid->script('user', array(
	'url' => '/users/get_list_users.json',
	'loadComplete' => '
function() {
        alert("Your grid has been loaded successfully");


Note: I still consider this plugin as very unstable.

Good luck and have fun.
-- rchavik
Something went wrong with that request. Please try again.