Adding an Action to a Component in CakePHP

I am trying to create a CakePHP component for jQuery data in server mode. I have a datatable working, but I want a component of it so that I can reuse it across multiple controllers.

When I include my new component in the controller, I want it to create a new action on that tabledata controller to handle XHR requests from JQuery. Is it possible?

I would also like to know if I would be doing it completely wrong.

+2


a source to share


1 answer


You can add a __call () method to your app_controller to check if your component is loaded and then do something.



0


a source







All Articles