tigrang / cakephp-datatable

JQuery DataTable plugin server-side processing component for CakePHP
47 stars 29 forks source link

How to declare $components & $helpers in individual controllers if I'm using AppController? #54

Closed MarioMarrufo closed 9 years ago

MarioMarrufo commented 9 years ago

Hi, I have declared in my AppController.php some $components and $helpers like this: public $components = array( 'DebugKit.Toolbar','Session','Acl','Auth');

public $helpers = array('Html' => array('className' => 'BoostCake.BoostCakeHtml'),'Form' => array('className' => 'BoostCake.BoostCakeForm'),...);

Having this configuration in AppController my question is: How to declare 'DataTable.DataTable' component and helper in individual Controllers like Users.php if it's not possible to redeclare classes? Which is the best configuration to use your plugin? I'm fan of JS datatables but newbie in CakePHP. Thanks.

MarioMarrufo commented 9 years ago

Well, I think that I need to look at the beginning of the controllers more often, I thought that the "public $components" are not declared in the controllers and then I got confused. Thanks, I close the comment now.