php-mvc icon indicating copy to clipboard operation
php-mvc copied to clipboard

I have a question about before and after

Open telemoes opened this issue 4 years ago • 4 comments

Hi David,

You have in your controller 2 methods before and after. How can i use it?

Martijn

telemoes avatar Nov 14 '20 23:11 telemoes

Hi Martijn,

these are controller action filters - details of how to use them here.

Cheers, Dave

daveh avatar Nov 15 '20 09:11 daveh

I am looking for a solution to add addons without changing the core code. Example I'm creating a webshop and want to add an add-on for the shopping cart.

telemoes avatar Nov 27 '20 22:11 telemoes

This depends on how you want the addons to work - if you don't change the core code, then you're limited to controllers, and the action filters mentioned above. If you give me more details and perhaps an example or two of how an add-on would work, we can look into how this would work in the framework.

daveh avatar Nov 28 '20 09:11 daveh

Think in wordpress there can you install other addons with changing the core. Given me somethime ti figure it out i think to use the mehtods before and after bud sometimes to firgure it out.

And a other problem how todo with the view when you add a new addon then i need something to show the view in a view...

telemoes avatar Nov 28 '20 21:11 telemoes