[symfony-users] Re: Best practice to allow for Action reuse?

2011-01-02 Thread Gabriel Petchesi
Look into Symfony events and Mixin mechanism: http://blog.sznapka.pl/symfony-mixins-how-to-extend-symfony-core-classes-without-inheritance/ older post from the symfony 1.0 era, not sure if this still applies: http://www.mail-archive.com/symfony-users@googlegroups.com/msg04765.html gabriel --

[symfony-users] Re: Best practice to allow for Action reuse?

2011-01-02 Thread Richtermeister
You can do that. Just Pass an extra Redirect Parameter to the route and Pick it up in the Action. On Jan 3, 5:47 am, Eric B ebenza...@gmail.com wrote: On Sun, Jan 2, 2011 at 9:08 AM, Svetoslav Shterev bgsa...@gmail.com wrote: On Sat, 2011-01-01 at 23:36 -0800, benze wrote: Hi, I'm

Re: [symfony-users] Re: Best practice to allow for Action reuse?

2011-01-02 Thread Eric B
On Mon, Jan 3, 2011 at 12:45 AM, Richtermeister nex...@gmail.com wrote: You can do that. Just Pass an extra Redirect Parameter to the route and Pick it up in the Action. Sure; that's what I ended up doing. But that assumes a lot of things: 1) that the action will be a success 2) that the

Re: [symfony-users] Re: Best practice to allow for Action reuse?

2011-01-02 Thread Gareth McCumskey
There is no need to worry about every outcome. Use elseif to cover all the possibilities you care about and a final else to catch anything else or even just end your action with a default function to perform if none of the others are hit. Trying to build an action in ANY app by trying to cover