samedi 23 juillet 2016

CakePHP 2 - how to modify data in afterFind() callback with function from component?

I would like to modify data that are selected in model in afterFind() callback function with functionality from my component class. I know it's anti-pattern, so how to automatically do it?

My component computes detail information for one particular record, and I would like to avoid need to modify data again manually in controller class.

What is best practice for this situation?

Aucun commentaire:

Enregistrer un commentaire