[symfony-users] Re: Deleting from database by click

2008-08-28 Thread Richtermeister
Hey Fabian, I actually wonder if what you describe there would really help, and I can only see it applicable for the delete method, and I guess there would have to be an opportunity to determine the following redirect and optionally set a flash message... not sure it's worth the trouble,

[symfony-users] Re: Deleting from database by click

2008-08-27 Thread Tom Haskins-Vaughan
You need to create a link in your template that calls a method in your actions. What is $all? torso wrote: Hi. I am trying to delete data from database by clicking. But when I give $all[$i]-delete() It deletes all data from database. I am trying to delete only one. Can somebody help,

[symfony-users] Re: Deleting from database by click

2008-08-27 Thread Fabian Lange
What I like is that this usage is intuitive: foreach($records as $record) { echo link_to_code($record,'delete()', 'Delete'.$recod-getName()); } if the the framework would expose the requested method of the object automatically as an webservice and could inject automatically the correct instance