[eluser]FranckRR[/eluser]
In the MVC paradigm, controllers respond to a user action (through a submitted form or an url). It must do only that !
Any other actions (DB access set apart), must be in classes or functions (thus library or helper).
The normal (and only one) flow is :
one action requested
-> one controller perform the action by using models to get data access, work on them
-> call a new view to display the result of the action
But there are case where within a controller, one must perfom another action. For instance from a list of anything, when a new instance is created, once done, we would like to request a list refreshing.
2 choices :
- display an intermediate view : instance created
- redirect ('list action', 'location') which performs a back & forth to the client