[symfony-users] symfony2:
Hello, is it possible to handle multiple db connections with symfony2? Is there a guide for this question? thanks for any answer. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] symfony2: constructor in controller class
Hello, what about initializing your custom controller class. Is it suitable to overrite the __constructor of the inherited class Symfony\Framework\FoundationBundle\Controller, and there to call the parent constructor? Are there similar to the Zend Framework init(), preDispatch() and postDispatch methods in a controller class which are called by the dispatcher, if existant? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Symfony2 PR3 and keeping up with the Symfony2 sandbox changes
Hi Fabian, I am new to Symfony2 and evaluating the framework. I checked out the svn repository today, and I did download the sandbox and the noelg-symfony-demo-7955c53. I do miss a file with a version number. sandbox and noelg-sf-demo differ from the svn (2010-08-18) but nowhere a version to be found? A clear version information would be very helpful! Obviously, the directoy names changed from Framework - Bundle and from Foundation - Framework ? Am I right? Is the svn repository usefull ? Or is there another official milestone release available ? (With usefull I mean the state of checked in files.) Why do you use this strange PR3 notation to publish symfony2 dev states? Why don't you use more common terminology like alpha, beta and release- canditate, everybody is used to? I mean, if you call it alpha, everybody knows that the api still can change. If you call it beta, api should not change anymore. If you call it preview canditate, no major bugs are expected to reside in the package. But if you call it PR3, nobody knows what you are talking about. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: too many queries with embedded forms
Daniel, Thank for you help, I send you the email. And here my form: $this-setWidget('intitule', new sfWidgetFormTextarea(array(), array('cols' = '40'))); $this-setWidget('activites_list', new sfWidgetFormSelectDoubleList(array( 'choices' = Doctrine_Core::getTable('CanardActivites')- createQuery('a')-execute(), 'label_associated' = 'Associé', 'label_unassociated' = 'Dissocié' ))); $this-embedRelations(array( 'CanardMaresA' = array( 'considerNewFormEmptyFields' = array('intitule', 'vol_id', 'cancan_id', 'photo'), 'multipleNewForms' = true, 'newFormsInitialCount' = 1, 'newRelationButtonLabel'= '+', 'displayEmptyRelations' = true, 'formClassArgs' = array(array('ah_add_delete_checkbox' = true)), 'newFormClass' = 'CanardMareEmbedForm', 'formClass' = 'CanardMareEmbedForm' ) )); (CanardMareEmbedForm is just to change order of fields) On 19 août, 02:01, Richtermeister nex...@gmail.com wrote: I've come across this as well, and the reason is that many of the choice widgets fire off a query to populate themselves. if you have 4 relationships per object that gives you 4 queries, and by embedding that many times, it multiplies quickly. I don't think there's anything you can do about this other than implement some kind of widget-level caching. Daniel On Aug 18, 4:07 pm, Daniel Lohse annismcken...@googlemail.com wrote: Mhm, that sure sounds like a lot. :( In the example I've given in the README I only have one additional query per embedded relation so something must be going wrong. Can you post the content's of your CanardCategorie form's configure() method please? And a couple of screenshots showing the admin interface (so I can see the embedded forms and what they contain) and the SQL queries web debug bar opened would be great! (you can also zip them up and send them to my Google email address (annismcken...@gmail.com) directly so we don't burden the group with this) Cheers, Daniel On 18.08.2010, at 16:39, spike3111 wrote: Hello, I use the plugi ahDoctrineEasyEmbeddedRelationsPlugin to embed forms. My schema is basic, I have a pet that may have a type of crying, a type of displacement, a place to live and belong to a group. So a four relationships one to many. I wanted my embed forms of animals in the middle of life. So I get the opportunity to modify or remove an animal. But for 13 animals nested, I get 60 requests! Hey, it's a bit much ... How can we reduce this number? I searched everywhere, but I can not find answers. CanardCategorie: columns: vol_id: { type: integer, notnull: true } cancan_id: { type: integer, notnull: true } mare_id: { type: integer, notnull: true } groupe_id: { type: integer, notnull: false } intitule: { type: string(255), notnull: true, unique: true } description: { type: string(255), notnull: false } photo: { type: string(255), notnull false } relations: CanardVol: { onDelete: CASCADE, local: vol_id, foreign: id, foreignAlias: CanardVols } CanardCancan: { onDelete: CASCADE, local: cancan_id, foreign: id, foreignAlias: CancardCancans } CanardMare: { local: mare_id, foreign: id, foreignAlias: CanardMaresA, alias: CanardMare, foreignType: many } CanardGroupe: { local: groupe_id, foreign: id, foreignAlias: CanardGroupe } CanardVol: columns: intitule: { type: string(255), notnull: true, unique: true } CanardCancan: columns: intitule: { type: string(255), notnull: true, unique: true } CanardMare: columns: intitule: { type: string(255), notnull: true } temperature: { type: integer, notnull: true } CanardGroupe: columns: intitule: { type: string(255), notnull: true } Thank you ! (I'm French, , Can be had noticed it !) -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] sfGuardAuth: where is the page after login defined?
Thanks for your reply. I've read the documentation which states: If you want to redirect the user to his profile after a success login or define a logout site. You can change the redirect values in app.yml: all: sf_guard_plugin: success_signin_url: @my_route?param=value # the plugin use the referer as default success_signout_url: module/action # the plugin use the referer as default I've now changed my app.yml to this and done symfony cc: # default values all: sf_guard_plugin: signin_form: sfGuardFormSigninCustom success_signin_url: @homepage # the plugin use the referer as default My homepage is defined in routing.yml as: homepage: url: / param: { module: main, action: index } So I should end up in /main/index after login, right? But after login I still end up in /profile. After login I can access /main/index normally, so there should be nothing preventing me there getting there. And I don't understand how I am getting to the /profile page in the first place if referer is the default place where users are redirected to (my login form is at / not at /profile where I am redirected after login). What am I doing wrong? Regards, Peter On Thu, Aug 19, 2010 at 9:30 AM, Christopher Schnell christopher.schn...@mda.ch wrote: Hi, ist in the docs of sfGuardPlugin, check the paragraph Customize sfGuardAuth redirect handling Regards, Christopher -Ursprüngliche Nachricht- Von: symfony-users@googlegroups.com [mailto:symfony- us...@googlegroups.com] Im Auftrag von Peter Peltonen Gesendet: Donnerstag, 19. August 2010 00:01 An: symfony-users@googlegroups.com Betreff: [symfony-users] sfGuardAuth: where is the page after login defined? A simple question: I'm new to sfGuardAuth. I have inherited a symfony 1.2 application which redirects the user to /profile module after login. I would need to change this to the /mypage module but I cannot find where this page where user is redirected after signing in is defined? Best, Peter -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Unsuscribe from digets
Hi, I would like to unsuscribe from emails sent for the digest for symfony because i have no time to read it. Thank you -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] schema modified but same old database
Hello, I have changed some things in the schema.yml and cleared cache ( both symfony cache:clear and symfony cc :-D ) I've rebuilt the model, I've done symfony doctrine:build --sql yet the same database is recreated, (deleted tables are back every time...) What am I missing? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] schema modified but same old database
There must be your old class in lib/form lib/model/ lib/filters... I had the same problem, and it seems like symfony uses you schema.yml but also base files in these directories. Delete them, rebuild everything and it should be ok! Jérémie Le jeudi 19 août 2010 à 10:34 +0200, KEY5 a écrit : Hello, I have changed some things in the schema.yml and cleared cache ( both symfony cache:clear and symfony cc :-D ) I've rebuilt the model, I've done symfony doctrine:build --sql yet the same database is recreated, (deleted tables are back every time...) What am I missing? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] schema modified but same old database
Look at the doctrine:clean-model-files task Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Thu, Aug 19, 2010 at 11:41 AM, Jérémie jeremie.symf...@gmail.com wrote: There must be your old class in lib/form lib/model/ lib/filters... I had the same problem, and it seems like symfony uses you schema.yml but also base files in these directories. Delete them, rebuild everything and it should be ok! Jérémie Le jeudi 19 août 2010 à 10:34 +0200, KEY5 a écrit : Hello, I have changed some things in the schema.yml and cleared cache ( both symfony cache:clear and symfony cc :-D ) I've rebuilt the model, I've done symfony doctrine:build --sql yet the same database is recreated, (deleted tables are back every time...) What am I missing? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] schema modified but same old database
./symfony doctrine:clean-model-files On Thu, Aug 19, 2010 at 10:34, KEY5 key5...@gmail.com wrote: Hello, I have changed some things in the schema.yml and cleared cache ( both symfony cache:clear and symfony cc :-D ) I've rebuilt the model, I've done symfony doctrine:build --sql yet the same database is recreated, (deleted tables are back every time...) What am I missing? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
AW: [symfony-users] sfGuardAuth: where is the page after login defined?
are you sure, that your predecessor didn't make any changes to the plugin itself? Shouldn't have, but you never know. AFAIK the referrer is used, if you got logged out due to a timeout. Regards, Christopher. -Ursprüngliche Nachricht- Von: symfony-users@googlegroups.com [mailto:symfony- us...@googlegroups.com] Im Auftrag von Peter Peltonen Gesendet: Donnerstag, 19. August 2010 09:39 An: symfony-users@googlegroups.com Betreff: Re: [symfony-users] sfGuardAuth: where is the page after login defined? Thanks for your reply. I've read the documentation which states: If you want to redirect the user to his profile after a success login or define a logout site. You can change the redirect values in app.yml: all: sf_guard_plugin: success_signin_url: @my_route?param=value # the plugin use the referer as default success_signout_url: module/action # the plugin use the referer as default I've now changed my app.yml to this and done symfony cc: # default values all: sf_guard_plugin: signin_form: sfGuardFormSigninCustom success_signin_url: @homepage # the plugin use the referer as default My homepage is defined in routing.yml as: homepage: url: / param: { module: main, action: index } So I should end up in /main/index after login, right? But after login I still end up in /profile. After login I can access /main/index normally, so there should be nothing preventing me there getting there. And I don't understand how I am getting to the /profile page in the first place if referer is the default place where users are redirected to (my login form is at / not at /profile where I am redirected after login). What am I doing wrong? Regards, Peter On Thu, Aug 19, 2010 at 9:30 AM, Christopher Schnell christopher.schn...@mda.ch wrote: Hi, ist in the docs of sfGuardPlugin, check the paragraph Customize sfGuardAuth redirect handling Regards, Christopher -Ursprüngliche Nachricht- Von: symfony-users@googlegroups.com [mailto:symfony- us...@googlegroups.com] Im Auftrag von Peter Peltonen Gesendet: Donnerstag, 19. August 2010 00:01 An: symfony-users@googlegroups.com Betreff: [symfony-users] sfGuardAuth: where is the page after login defined? A simple question: I'm new to sfGuardAuth. I have inherited a symfony 1.2 application which redirects the user to /profile module after login. I would need to change this to the /mypage module but I cannot find where this page where user is redirected after signing in is defined? Best, Peter -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Basic routin question
Hi, I'm quite new to Symfony. I have something strange with routing. My apps/frontend/config/routing.yaml contain this homepage: url: / param: { module: content, action: index } default_index: url: /:module param: { action: index } default: url: /:module/:action/* If i open http://127.0.0.1:8090/index.php i see the default symfony page Symfony Project Created. If i Open http://127.0.0.1:8090/frontend_dev.php/ i get the page for content/index. What am I doing wrong? :) Thanks Paolo -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Basic routin question
Hi, Clear your cache. I would presume that is the problem. The dev environment is using the new route as it clears the cache on every request. But your production environment is using the cache as it hasn't been cleared manually. Chris On Aug 19, 11:25 am, torok84 toro...@gmail.com wrote: Hi, I'm quite new to Symfony. I have something strange with routing. My apps/frontend/config/routing.yaml contain this homepage: url: / param: { module: content, action: index } default_index: url: /:module param: { action: index } default: url: /:module/:action/* If i openhttp://127.0.0.1:8090/index.phpi see the default symfony page Symfony Project Created. If i Openhttp://127.0.0.1:8090/frontend_dev.php/ i get the page for content/index. What am I doing wrong? :) Thanks Paolo -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Unhappy: sending mails with layout
Please? Am 18.08.2010 15:22, schrieb Georg: Hello, I am confused. I would like to send emails with layout and template from any place in my project, application or task. Reading the docs (http://www.symfony-project.org/more-with-symfony/1_4/en/04-Emails), it tells me to put each email in a class, and Of course, adding a base class to centralize the shared headers like the From header, or to add a common signature can be convenient. Here comes the part why I am unhappy and confused, I have a cool MVC framework, and for emails I should go back to home-brew PHP and mix view and controller? Wouldn't it be cleaner to put the email views in a plugin, and make them accessible from everywhere? I would have expected a plugin that makes this possible, but no. How are you doing it, where do you put the presentation layers of your emails? Georg -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] symfony2: constructor in controller class
On 8/19/10 8:51 AM, symfony.reloa...@googlemail.com wrote: Hello, what about initializing your custom controller class. Is it suitable to overrite the __constructor of the inherited class Symfony\Framework\FoundationBundle\Controller, and there to call the parent constructor? You can inherit the constructor, but you cannot add more arguments (they won't be filled by the framework). But as the argument is the container, everything you need should probably be stored in the Container already. Are there similar to the Zend Framework init(), preDispatch() and postDispatch methods in a controller class which are called by the dispatcher, if existant? Nope. The current implementation of the Controllers will probably still change. I want to be able to remove the need to extend a base Controller class. If you have a look at the current Controller base class, you will see that there is nothing more than proxy methods. Fabien -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: too many queries with embedded forms
Oups, it was not CanardCategorieForm, this is it : unset( $this['created_at'], $this['updated_at'], $this['canard_groupe_list'] ); $this-setWidget('description', new sfWidgetFormTextarea(array(), array('size' = '20x5'))); $this-setWidget('vol_id', new sfWidgetFormDoctrineChoice(array('model' = $this- getRelatedModelName('CanardVol'), 'add_empty' = true))); $this-setWidget('cancan_id', new sfWidgetFormDoctrineChoice(array('model' = $this- getRelatedModelName('CanardCancan'), 'add_empty' = true))); $this-setWidget('photo', new sfWidgetFormInputFileEditable(array( 'label' = 'Photo', 'file_src'= $this-getObject()-getCanardFileSrcMini(), 'edit_mode' = !$this-isNew(), 'is_image'= !is_null($this-getObject()-getCanardFileSrc()), 'delete_label' = 'Supprimer', 'template' = 'div%file%br /%input%br /%delete% %delete_label%/div', ))); $this-validatorSchema['photo_delete'] = new sfValidatorPass(); $this-setValidator('photo', new sfValidatorFile(array( 'mime_types' = 'web_images', 'path' = $this-getObject()-getCanardDirPath(), 'required' = false ))); On 19 août, 09:28, spike3111 gilles.gauthie...@gmail.com wrote: Daniel, Thank for you help, I send you the email. And here my form: $this-setWidget('intitule', new sfWidgetFormTextarea(array(), array('cols' = '40'))); $this-setWidget('activites_list', new sfWidgetFormSelectDoubleList(array( 'choices' = Doctrine_Core::getTable('CanardActivites')-createQuery('a')-execute(), 'label_associated' = 'Associé', 'label_unassociated' = 'Dissocié' ))); $this-embedRelations(array( 'CanardMaresA' = array( 'considerNewFormEmptyFields' = array('intitule', 'vol_id', 'cancan_id', 'photo'), 'multipleNewForms' = true, 'newFormsInitialCount' = 1, 'newRelationButtonLabel' = '+', 'displayEmptyRelations' = true, 'formClassArgs' = array(array('ah_add_delete_checkbox' = true)), 'newFormClass' = 'CanardMareEmbedForm', 'formClass' = 'CanardMareEmbedForm' ) )); (CanardMareEmbedForm is just to change order of fields) On 19 août, 02:01, Richtermeister nex...@gmail.com wrote: I've come across this as well, and the reason is that many of the choice widgets fire off a query to populate themselves. if you have 4 relationships per object that gives you 4 queries, and by embedding that many times, it multiplies quickly. I don't think there's anything you can do about this other than implement some kind of widget-level caching. Daniel On Aug 18, 4:07 pm, Daniel Lohse annismcken...@googlemail.com wrote: Mhm, that sure sounds like a lot. :( In the example I've given in the README I only have one additional query per embedded relation so something must be going wrong. Can you post the content's of your CanardCategorie form's configure() method please? And a couple of screenshots showing the admin interface (so I can see the embedded forms and what they contain) and the SQL queries web debug bar opened would be great! (you can also zip them up and send them to my Google email address (annismcken...@gmail.com) directly so we don't burden the group with this) Cheers, Daniel On 18.08.2010, at 16:39, spike3111 wrote: Hello, I use the plugi ahDoctrineEasyEmbeddedRelationsPlugin to embed forms. My schema is basic, I have a pet that may have a type of crying, a type of displacement, a place to live and belong to a group. So a four relationships one to many. I wanted my embed forms of animals in the middle of life. So I get the opportunity to modify or remove an animal. But for 13 animals nested, I get 60 requests! Hey, it's a bit much ... How can we reduce this number? I searched everywhere, but I can not find answers. CanardCategorie: columns: vol_id: { type: integer, notnull: true } cancan_id: { type: integer, notnull: true } mare_id: { type: integer, notnull: true } groupe_id: { type: integer, notnull: false } intitule: { type: string(255), notnull: true, unique: true } description: { type: string(255), notnull: false } photo: { type: string(255), notnull false } relations: CanardVol: { onDelete: CASCADE, local: vol_id, foreign: id, foreignAlias: CanardVols } CanardCancan: { onDelete: CASCADE, local: cancan_id, foreign: id, foreignAlias: CancardCancans } CanardMare: { local: mare_id, foreign: id, foreignAlias: CanardMaresA, alias: CanardMare, foreignType: many } CanardGroupe: { local: groupe_id, foreign: id,
Re: [symfony-users] Re: Basic routin question
To clarify this, the cache he means is the symfony application cache. On the command line in your project root directory type symfony cc On Thu, Aug 19, 2010 at 12:43 PM, catchamonkey ch...@sedlmayr.co.uk wrote: Hi, Clear your cache. I would presume that is the problem. The dev environment is using the new route as it clears the cache on every request. But your production environment is using the cache as it hasn't been cleared manually. Chris On Aug 19, 11:25 am, torok84 toro...@gmail.com wrote: Hi, I'm quite new to Symfony. I have something strange with routing. My apps/frontend/config/routing.yaml contain this homepage: url: / param: { module: content, action: index } default_index: url: /:module param: { action: index } default: url: /:module/:action/* If i openhttp://127.0.0.1:8090/index.phpi see the default symfony page Symfony Project Created. If i Openhttp:// 127.0.0.1:8090/frontend_dev.php/ i get the page for content/index. What am I doing wrong? :) Thanks Paolo -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Create auto increment index on save
Hi, I have a one-to-one relation in with sfGuardUser. As I want to have a clean code, i'd like to override save() in lib/model/doctrine/ sfDoctrineGuardPlugin/sfGuardUser.class.php to create a new row in the other table of the relation each time the save function is called. Things is that the new row depends on the id that'll be insert in sf_guard_user Table. As i don't want to touch the plugin, my question is : is there's a way to deduct the new id that'll be created in the sf_guard_user (autoincrement). I tryed to, in the save() action to do : public function save(Doctrine_Connection $conn = null) { $user = parent::save($conn); $traderProfile = new TraderProfile(); $traderProfile-setUserId($user-id); $traderProfile-save(); return $user; } But at this step, user-id is still not created. Any idea ? (As a solution, i can still retrieve the id in the Action, after saving the object (doctrine will have insert thre row), but then it's not automatic). Regards. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Abridged summary of symfony-users@googlegroups.com - 48 Messages in 26 Topics
Beste, Donderdag 19 tot en met maandag 23 augustus ben ik niet aanwezig op kantoor. U kunt voor dringende zaken contact opnemen met mijn collega Dimitri van Hees: dimi...@freshheads.com of 013 5448761. Met vriendelijke groet, Joost Farla joost.fa...@freshheads.com - - freshheads grafisch ontwerp en internet applicaties Dunantstraat 1c | 5017 KC Tilburg | Nederland tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762 i...@freshheads.com | www.freshheads.com -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Basic routin question
do symfony clear-cache On 19 авг, 17:25, torok84 toro...@gmail.com wrote: Hi, I'm quite new to Symfony. I have something strange with routing. My apps/frontend/config/routing.yaml contain this homepage: url: / param: { module: content, action: index } default_index: url: /:module param: { action: index } default: url: /:module/:action/* If i openhttp://127.0.0.1:8090/index.phpi see the default symfony page Symfony Project Created. If i Openhttp://127.0.0.1:8090/frontend_dev.php/ i get the page for content/index. What am I doing wrong? :) Thanks Paolo -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: IS there any manual to correct unit test system for integrating with sfGuard auth symfony?
On 19 Ago, 05:14, Maxim Oleinik maxim.olei...@gmail.com wrote: protected function authenticateUser(sfGuardUser $user) { // Init session $context = $this-browser-getContext(true); $context-getUser()-signIn($user); $context-getUser()-shutdown(); $context-getStorage()-shutdown(); } Ugly! try this one: public function login($username = 'foo', $password = 'bar') { return $this-click('sign in', array('signin' = array( 'username' = $username, 'password' = $password, )))-with('response')-isRedirected()-followRedirect(); } of course, replace 'foo' and 'bar' with your preferred default credentials cheers Massimiliano -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Basic routin question
Thanks, it worked. On Aug 19, 1:22 pm, Gareth McCumskey gmccums...@gmail.com wrote: To clarify this, the cache he means is the symfony application cache. On the command line in your project root directory type symfony cc On Thu, Aug 19, 2010 at 12:43 PM, catchamonkey ch...@sedlmayr.co.uk wrote: Hi, Clear your cache. I would presume that is the problem. The dev environment is using the new route as it clears the cache on every request. But your production environment is using the cache as it hasn't been cleared manually. Chris On Aug 19, 11:25 am, torok84 toro...@gmail.com wrote: Hi, I'm quite new to Symfony. I have something strange with routing. My apps/frontend/config/routing.yaml contain this homepage: url: / param: { module: content, action: index } default_index: url: /:module param: { action: index } default: url: /:module/:action/* If i openhttp://127.0.0.1:8090/index.phpisee the default symfony page Symfony Project Created. If i Openhttp:// 127.0.0.1:8090/frontend_dev.php/ i get the page for content/index. What am I doing wrong? :) Thanks Paolo -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
AW: [symfony-users] Re: IS there any manual to correct unit test system for integrating with sfGuard auth symfony?
You are talking about functional tests, but the original post was about unit tests. Regards, Christopher. -Ursprüngliche Nachricht- Von: symfony-users@googlegroups.com [mailto:symfony- us...@googlegroups.com] Im Auftrag von Massimiliano Arione Gesendet: Donnerstag, 19. August 2010 16:06 An: symfony users Betreff: [symfony-users] Re: IS there any manual to correct unit test system for integrating with sfGuard auth symfony? On 19 Ago, 05:14, Maxim Oleinik maxim.olei...@gmail.com wrote: protected function authenticateUser(sfGuardUser $user) { // Init session $context = $this-browser-getContext(true); $context-getUser()-signIn($user); $context-getUser()-shutdown(); $context-getStorage()-shutdown(); } Ugly! try this one: public function login($username = 'foo', $password = 'bar') { return $this-click('sign in', array('signin' = array( 'username' = $username, 'password' = $password, )))-with('response')-isRedirected()-followRedirect(); } of course, replace 'foo' and 'bar' with your preferred default credentials cheers Massimiliano -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Doctrine Query Cache and Symfony Pagers
Hi all, I'm having trouble with the doctrine query cache in combination with pagers. I have a query with some inner and left joins that I use with a pager. The pager then creates a subquery to get the right amount of rows from the db: SELECT * FROM table1 c LEFT JOIN table2 c2 ON c.id = c2.id INNER JOIN table3 c3 ON c.id = c3.id WHERE c.id IN (SELECT doctrine_subquery_alias.id FROM (SELECT DISTINCT c4.id FROM table1 c4 LEFT JOIN table2 c5 ON c4.id = c5.id INNER JOIN table3 c6 ON c4.id = c6.id WHERE c4.acondition = ? LIMIT 24) AS doctrine_subquery_alias) AND (c.acondition = ?) If the query is reused from the cache only one argument is passed to it (the one from the original one). But it should get two arguments because the pager created a subquery that also takes an argument. Is that a bug in symfony or doctrine or not at all? Does anyone have a solution? If not I'd have just to turn off caching for all the queries of that type using a pager... Cheers, Lea -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Setting up SF under IIS
Hi everyone ! I am new and I've tried to learn from jobeet and askeet tutorials. I've managed to create a app and finally I've tried to place it online for my boss. Problem is that the production server is a windows 2003 with IIS. I've checkout there symfony version 1.4.0 (C:\symfony\lib) and setup a new site under IIS console at c:\inetpub\mysite\web, and added as virtual folder the C:\symfony\data\web\sf Than I've added to c:\inetpub\mysite\cache the IUSR user and added full read write execute rights - just to be sure, than for c:\symfony added authenticated users read execute and replaced on all childs I receive when accessing the http://MYSITE/frontend_dev.php/machine Fatal error: Call to undefined method sfOutputEscaperArrayDecorator::getQuestionaire() in ... (I see no SF debug bar) and when http://MYSITE/machine THE PAGE CANNOT BE FOUND I've thought the philosophy of Symfony is the flexibility from DB to code and from APACHE to IIS and MySQL to MSSQL. Can anyone send me a helping hand please ? With kind regards Petronel -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Signout Flagged User from Admin Backend
I'm trying to make the admin able to sign out a user when he flags them from the backend while using SfDoctrineGuardPlugin. I thought I got the filter class down: public function execute($filterChain) { // Use context object since filters don't have direct access to request or user objects $request = $this-getContext()-getRequest(); $user = $this-getContext()-getUser(); if(!$user-isActive()) // Do not continue filter chain... sign user out return $this-getContext()-getController()- forward('sfGuardAuth', 'signout'); $filterChain-execute(); } ... with this in the filters yml is_active: class:sfGuardIsActiveFilter param: is_active: ... but I'm now getting Too many forwards. I kind of understand what the problem is, but I don't know how to fix it. I initially tried making it forward straight to the sfGuardSecurityUser signOut() method, but it failed to find it. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Unknown record property in more than one m-n relationships
For the history, found it eventually. It was the same foreignAlias in the Book table: foreignAlias: Books -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] How to set a field with the id of the doctrine object in the saving process
Hi! I have a doctrine model like this: Asset: columns: filename: { type: string(255), notnull: false, unique: true } filesize: { type: integer, notnull: true } In the saving process I want to check if the user has left the filename empty. In that case i want to set the filename with the id of the object. The problem is that I don't know where the Id of the object is aviable in the saving process. ¿have I to do it in the doSave method? ¿after o before calling the parent::doSave I want to do something like this: public function doSave($con = null) { if(null === $this-getObject()-getFilename()){ $this-getObject()-setFilename($this-getObject()- getId()); } parent::doSave($con); } -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] How to set a field with the id of the doctrine object in the saving process
El 19/08/2010 15:55, Alexis Sanchez escribió: Hi! I have a doctrine model like this: Asset: columns: filename: { type: string(255), notnull: false, unique: true } filesize: { type: integer, notnull: true } In the saving process I want to check if the user has left the filename empty. In that case i want to set the filename with the id of the object. The problem is that I don't know where the Id of the object is aviable in the saving process. ¿have I to do it in the doSave method? ¿after o before calling the parent::doSave I want to do something like this: public function doSave($con = null) { if(null === $this-getObject()-getFilename()){ $this-getObject()-setFilename($this-getObject()- getId()); } parent::doSave($con); } Alexis Sanchez!... how are going all in Udinese FC? ;) You can use triggers 'before insert, update' over the table for do that. Other way, is retyping the action doSave() like your example, but I think that the condition if must be after to call parent::doSave($con). Cheers... I hope that you and Mauricio Isla will have a good session in the Calcio ;)... LOL c ya. -- Rodrigo Ruiz Fuentes -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: How to set a field with the id of the doctrine object in the saving process
You can use triggers 'before insert, update' over the table for do that. 'AFTER INSERT, UPDATE' I mean. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] organizing partials in folders
include_partial(headline_news); How can I do this with partial _headline_news.php inside a folder within templates? If I try something like project_root/apps/frontend/modules/some_module/templates/folder/ _headline_news.php Then in the template index include_partial(folder/headline_news); The template _headline_news.php does not exist or is unreadable in . Am I using the wrong approach? I have symfony managing two separate site templates that will each have separate partials. But the same actions are used for each template. I need a way to organize all the files in the module /template folder. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] How to set a field with the id of the doctrine object in the saving process
Why don't you give it just a random name? Am 19.08.2010 21:55, schrieb Alexis Sanchez: Hi! I have a doctrine model like this: Asset: columns: filename: { type: string(255), notnull: false, unique: true } filesize: { type: integer, notnull: true } In the saving process I want to check if the user has left the filename empty. In that case i want to set the filename with the id of the object. The problem is that I don't know where the Id of the object is aviable in the saving process. żhave I to do it in the doSave method? żafter o before calling the parent::doSave I want to do something like this: public function doSave($con = null) { if(null === $this-getObject()-getFilename()){ $this-getObject()-setFilename($this-getObject()- getId()); } parent::doSave($con); } -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Unhappy: sending mails with layout
Hi, I quiet like to use the dispatcher to send email. The listener will build the email. For the layout, I only use partial -renderPartial(), that can act as a layout because you can include other partial/component in a partial. Maybe with sfView or sfPHPView there is a way to render a complete layout.. I am quiet interested too if there is an easy solution. If not, partial and component are good. On Aug 19, 1:22 am, Georg geor...@have2.com wrote: Hello, I am confused. I would like to send emails with layout and template from any place in my project, application or a task. Reading the docs (http://www.symfony-project.org/more-with-symfony/1_4/en/04-Emails), it tells me to put each email in a class, and Of course, adding a base class to centralize the shared headers like the From header, or to add a common signature can be convenient. Here comes the part why I am unhappy and confused, I have a cool MVC framework, and for emails I should go back to home-brew PHP and mix view and controller? Wouldn't it be cleaner to put the email views in a plugin, and make them accessible from everywhere? I would have expected a plugin that makes this possible, but no. How are you doing it, where do you put the presentation layers of your emails? Georg -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Changing a plugin modules securitysettings
Hi, I got an app where I have set is_secure:true in app/admin/config/ security.yml. For those modules I want to have public access to, I then change the setting in the module/someModule/config/security.yml file. But, now I got a problem, because I have integrated a symfony plugin, and in that plugin there is a module I want to make public. Is there a way for me to change the security settings of that plugin module without modifying the plugin? I'm using Symfony 1.4. Regards, Tarjei -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] How to set a field with the id of the doctrine object in the saving process
If you have unique = true and notnull = true then you have to assign a unique filename before you save the object, or you would have an exception. The better way would be to just assign a random name, as Georg says. If you really need the ID on the name, then first assign a random name and, after the parent::doSave( $con ) assign the ID again to the filename. On Thu, Aug 19, 2010 at 6:17 PM, Georg geor...@have2.com wrote: Why don't you give it just a random name? Am 19.08.2010 21:55, schrieb Alexis Sanchez: Hi! I have a doctrine model like this: Asset: columns: filename: { type: string(255), notnull: false, unique: true } filesize: { type: integer, notnull: true } In the saving process I want to check if the user has left the filename empty. In that case i want to set the filename with the id of the object. The problem is that I don't know where the Id of the object is aviable in the saving process. żhave I to do it in the doSave method? żafter o before calling the parent::doSave I want to do something like this: public function doSave($con = null) { if(null === $this-getObject()-getFilename()){ $this-getObject()-setFilename($this-getObject()- getId()); } parent::doSave($con); } -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] How to set a field with the id of the doctrine object in the saving process
I forgot to mention: The exception would be thrown if you attempt to insert (or update) a second object with an empty filename (having a nullable field you could insert as many objects as you want with NULL assigned to that field) On Thu, Aug 19, 2010 at 7:08 PM, Gustavo Adrian comfortablynum...@gmail.com wrote: If you have unique = true and notnull = true then you have to assign a unique filename before you save the object, or you would have an exception. The better way would be to just assign a random name, as Georg says. If you really need the ID on the name, then first assign a random name and, after the parent::doSave( $con ) assign the ID again to the filename. On Thu, Aug 19, 2010 at 6:17 PM, Georg geor...@have2.com wrote: Why don't you give it just a random name? Am 19.08.2010 21:55, schrieb Alexis Sanchez: Hi! I have a doctrine model like this: Asset: columns: filename: { type: string(255), notnull: false, unique: true } filesize: { type: integer, notnull: true } In the saving process I want to check if the user has left the filename empty. In that case i want to set the filename with the id of the object. The problem is that I don't know where the Id of the object is aviable in the saving process. żhave I to do it in the doSave method? żafter o before calling the parent::doSave I want to do something like this: public function doSave($con = null) { if(null === $this-getObject()-getFilename()){ $this-getObject()-setFilename($this-getObject()- getId()); } parent::doSave($con); } -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Using Session in Symfony2 PR3
I created a class for UserSecurity which extends the Symfony\Components \HttpFoundation\Session. Then i use $this-session- setAttribute('isAuthenticated', true); to tell the code that the user is logged-in. but it doesn't store it in the session. Any ideas why? do I have to run something after I set an attribute? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] doSave on a standalone sfForm
Hi, I have made a custom form which extends sfForm. The responses from the form are to be stored in a third party CRM database via a web service; they have no connection to the local database or an object in schema.yml. I need to send those values through when the form is saved and valid; but since I'm using sfForm instead of sfFormDoctrine which extends sfFormObject, I don't have doSave() etc. Can I get some suggestions for the best way to do this? Where should the code that posts the values through go in? I could put it in the action itself, but I would prefer it more attached to the form itself. The other thing I thought of was to use a callback postvalidator and put it in there. I guess I could override bind() and put it there, but to me that doesn't really seem like the most appropriate place for it; I would say that bind is for binding values, not for saving or anything like that. Does anyone have any suggestions about the best way for me to do this? thanks Brett -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Check culture in i18n form
When I'm in the i18n form class (example: PageI18nForm.class.php), how can I see for which culture it is? Because in the PageForm.class.php, the PageI18nForm.class.php is called for each culture I embed it for. So, I need to retrieve that in the i18n form itself. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] doSave on a standalone sfForm
I would create a custom form class that extends from sfForm (sfFormCRM for example) and put there all the saving logic of the form. Then it would be a nice idea to have a BaseFormCRM that inherits from your sfFormCRM to have a place to put common application logic between your CRM forms without touching your sfFormCRM (or you could just put on sfFormCRM everything. But I would separate just in case). Finally, you could extend that form to create your own CRM forms. On Fri, Aug 20, 2010 at 1:55 AM, bretth brett...@gmail.com wrote: Hi, I have made a custom form which extends sfForm. The responses from the form are to be stored in a third party CRM database via a web service; they have no connection to the local database or an object in schema.yml. I need to send those values through when the form is saved and valid; but since I'm using sfForm instead of sfFormDoctrine which extends sfFormObject, I don't have doSave() etc. Can I get some suggestions for the best way to do this? Where should the code that posts the values through go in? I could put it in the action itself, but I would prefer it more attached to the form itself. The other thing I thought of was to use a callback postvalidator and put it in there. I guess I could override bind() and put it there, but to me that doesn't really seem like the most appropriate place for it; I would say that bind is for binding values, not for saving or anything like that. Does anyone have any suggestions about the best way for me to do this? thanks Brett -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en