[symfony-users] Re: Handling dynamic data in the generator.yml

2010-12-28 Thread Gabriel Petchesi
In my opinion the proper place to do it is to override the autogenerated actions: executeNew executeCreate* executeEdit executeUpdate* executeDelete and put in there the conditions that checks for user type and instantiate the right form class. You could do it in the form class itself without ch

[symfony-users] Re: Handling dynamic data in the generator.yml

2010-12-28 Thread Tristan
Thanks for the tip ;) On 28 déc, 09:26, Gabriel Petchesi wrote: > In my opinion the proper place to do it is to override the autogenerated > actions: > executeNew > executeCreate* > executeEdit > executeUpdate* > executeDelete > and put in there the conditions that checks for user type and instan

[symfony-users] I18n format_date() in task

2010-12-28 Thread hribo
Hi all, I want to use cron to send email by using symfony task, in symfony 1.4.9 My email is i18n mail and should be rendered before sending. Everything is internationalized okay, except *format_date()* I created email pattern in lib/email and is extending Swift_Message class. I am also setting

[symfony-users] HTML email with picture from class

2010-12-28 Thread hribo
I would like to send picture from lib/email/MyEmailMessge.class.php My class extends Swift_Message class. I know how to send picture in email when i call sending email from an * action*: $message = Swift_Message::newInstance(); $cid = $message->embed(Swift_Image::fromPath('images/symfon

Re: [symfony-users] Re: Handling dynamic data in the generator.yml

2010-12-28 Thread Stéphane
When using the admin generator, there is a configuration class which have a getFormClass method (or such), just override this method as you which :) Regards, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Tue

Re: [symfony-users] I18n format_date() in task

2010-12-28 Thread Gábor Fási
Try passing the culture parameter. function format_date($date, $format = 'd', $culture = null, $charset = null) On Tue, Dec 28, 2010 at 11:20, hribo wrote: > Hi all, > > I want to use cron to send email by using symfony task, in symfony 1.4.9 > > My email is i18n mail and should be rendered befo

[symfony-users] Re: I18n format_date() in task

2010-12-28 Thread Hugo HAMON
Hi Hribo, You should read carefully the following chapter from the official symfony documentation : http://www.symfony-project.org/more-with-symfony/1_4/en/13-Leveraging-the-Power-of-the-Command-Line You will find everything you want about the tasks subframework and I18N in tasks. Hugo Hamon. S

Re: [symfony-users] Re: Need to hide sfWidgetFormDoctrineChoice dropdown when editing existing record

2010-12-28 Thread Alan Bem
You MUSTdestroy that widget/validator because there is possiblity that DoctrineForm will hydrate (@see doUpdateObject() method) your object with VALIDATED hidden input. 2010/12/26 dmitrypol > Thank you VERY MUCH. I was not able to make unset work as I think it > needed the id but you gave me

[symfony-users] sfGuardUserProfile and onDelete: CASCADE

2010-12-28 Thread jimpass
Hi ! Got a little problem with my sfGuardUserProfile. I had this in my schema.yml to have a user profile. sfGuardUserProfile: tableName: sf_guard_user_profiles columns: user_id: { type: integer(4), primary: true } firstname: { type: string(80), notnull: true } lastname: { type

[symfony-users] doctrine many to many relation with extra fields in related table

2010-12-28 Thread Jaime
Hi, I have in my schema a n:m relation within two tables, but the middle table has an extra field (value) not shown in the admin generator How can I fix this? I tried with embedRelation and a combination of embedform and foreach... but I don't get the results I want. Any ideas? -- If you want