[symfony-users] Re: On $form->save() and knowing if anything has changed

2010-11-14 Thread LeBurt
Well, I suppose I can live with it for the moment. My ideal solution would be like this: $supplier = $form->save(); if ($supplier->isModified()) return 'changes'; else return 'nochange'; but I'm afraid I need more time before I can come up with a solution to this myself. I'm not just learning Sym

[symfony-users] jq_submit_to_remote examples

2010-11-14 Thread Martin Ibarra Cervantes
Hi, guys, i want use jquery on my forms but i dont have idea how use this. for example this my little form getObject()->isNew()): ?> Usuario

Re: [symfony-users] Re: On $form->save() and knowing if anything has changed

2010-11-14 Thread Daniel Lohse
Yes, you can indeed do that — I might have a look at the Timestampable behavior and see what it does, maybe you'll get some more insights into how you can do this some other way but if you can live with your solution then that's also fine. :) Cheers, Daniel Sent from my iPad On Nov 15, 2010,

[symfony-users] Re: On $form->save() and knowing if anything has changed

2010-11-14 Thread LeBurt
Well, we can mark this one solved. Daniel's solution seemed simple and elegant but I couldn't really figure it out with my cuurent level of knowledge. Then I read Richtermeister's post again and fathomed that all I'd have to do is add the timestampable behavior on my Doctrine class and then do this

[symfony-users] Re: On $form->save() and knowing if anything has changed

2010-11-14 Thread LeBurt
@Richtermeister: Good idea, I dumped the serialized objects before and after and they are indeed different, although not in the updated_at field which I'm not using. This is what I got: Before: string(2636) "C:8:"Supplier":1864:{a:14:{s:3:"_id";a:1:{s:2:"id";i:8;} s:5:"_data";a:40:{s:2:"id";i:8;

Re: [symfony-users] [Symfony2][Best Practice]Model

2010-11-14 Thread Pablo Díez
Yes, and to use the repositories in namespaces or not. Model\Article Model\ArticleRepository Model\Article Repository\Article Pablo On Sun, Nov 14, 2010 at 8:02 PM, Richard D Shank wrote: > There has been some discussion about where the best place is to put > interfaces, base classes and mode

[symfony-users] [Symfony2][Best Practice]Model

2010-11-14 Thread Richard D Shank
There has been some discussion about where the best place is to put interfaces, base classes and models not requiring an ORM or ODM. In the DoctrineUserBundle, these have be put in the Model folder. I would like to propose using the Model folder for that purpose as a best practice. Richard

[symfony-users] Symfony2 and Translation

2010-11-14 Thread Bertrand Zuchuat
Hi, I would like to use the translation on my test project but i have some problems. i make my dictionary into src/Application/myAppBundle/Resources/translations/messages.en.php. content of this file: return array( 'A propos' => 'About', 'Quitter' => 'Quit', ); my config: app.config:

[symfony-users] admin generator - override executeCreate() action

2010-11-14 Thread ruigoncalves
Hi! One feature of the current project where I am working, is sending an email notification with some information about the recent created object. Bellow, is an action which already had worked on the past! public function executeCreate(sfWebRequest $request) { try { parent::executeCreate