Re: Yan: [symfony-users] Re: 06-Advanced-Forms Some Questions.

2010-11-24 Thread Raphael Schumacher
>  $subForm->getWidgetSchema()->setLabel($index, " "); > > in embedRelation() function in sfFormDoctrine class. I am not sure if it the > right way ? This may work (although rather a hack, beauty alone doesn't save your life), maybe only partially, as this is actually a topic of rendering the HTM

Re: Yan: [symfony-users] Re: 06-Advanced-Forms Some Questions.

2010-11-24 Thread Raphael Schumacher
On 23 Nov., 13:43, Stéphane wrote: > Of course, instead of using static variables, you can create getters to > retrieve values from configurations, so it will be easier to change the > number of allowed uploadable photos by simply changing a value in a > config/app.yml. > Something like > public f

Re: Yan: [symfony-users] Re: 06-Advanced-Forms Some Questions.

2010-11-23 Thread Raphael Schumacher
To limit the number of uploadable photos to 6 at most: // lib/form/doctrine/ProductForm.class.php public function configure() { static $maxUploadablePhotos = 6; static $maxUploadablePhotosAtOnce = 2; $form = new ProductPhotoCollectionForm(null, array( 'product' => $this->getObject(),

[symfony-users] Re: I18N: separate country and language?

2010-11-03 Thread Raphael Schumacher
Hi, I have an answer to your question in http://forum.symfony-project.org/viewtopic.php?f=22&t=30678&start=0 Regards, RAPHAEL -- 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 t

[symfony-users] Re: Remove column through schema.yml (Doctrine)

2010-10-24 Thread Raphael Schumacher
This presentation could be of help to you: http://www.slideshare.net/denderello/symfony-live-2010-using-doctrine-migrations -- 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

[symfony-users] Re: Multiple submit buttons/Multiple forms

2010-10-21 Thread Raphael Schumacher
some light upon $request variable. I see both of you > guys using it, typically I use it always as: > > $this->getRequest()->getParameter()etc...but is there a way to > initialize $request. > > Thanks a ton, Happy weekend![?] > > On Thu, Oct 14, 2010 at 4:32 AM, Raphael Sch

[symfony-users] Re: best way to implement ownership?

2010-10-21 Thread Raphael Schumacher
It's not a solution, but it can be one part of the solution you are searching for: the sfDoctrineActAsSignablePlugin plugin. --> http://www.symfony-project.org/plugins/sfDoctrineActAsSignablePlugin Another source for information: http://www.slideshare.net/jcleveley/working-with-the-admin-gener

[symfony-users] Re: How to change a POST value posted from form

2010-10-20 Thread Raphael Schumacher
> but is it possible to get request parameter inside the model layer? No, MVC doesn't allow the model to know the scenario (or the use case) and thus where from some specific information is coming. In principle only the action (the "C" controller part in MVC) knows about the specific scenario and t

[symfony-users] Re: Multiple submit buttons/Multiple forms

2010-10-14 Thread Raphael Schumacher
Provided that I haven't misunderstood your problem, I think that you can add multiple submit buttons to one form, and that you can differentiate them in the action through their name attributes. So there would be no need to have multiple instances of the (same) form. E.g. in the template for your

[symfony-users] Re: Inheritance issue...

2010-09-02 Thread Raphael Schumacher
You may check out whether the behavior features in Doctrine may serve you for your need: - use the Searchable behavior/template provided by Doctrine, or - develop your own Doctrine behavior that suits your exact needs For the latter, refer to http://www.symfony-project.org/more-with-symfony/1_4/

[symfony-users] Re: How to validate: "required: true" for foreign key

2010-08-26 Thread Raphael Schumacher
This is quite easy. The validator that the (Doctrine-generated) class BaseOrganisationForm is setting up, is fine and doesn't need to be replaced. Just add the required option to that validator, such as follows: In the configure() method of your form class: $this->validatorSchema['organisation

[symfony-users] Re: Headers already sent

2010-05-18 Thread Raphael Schumacher
the wrote: > I'd add as common cases, classes with spaces BEFORE the http://groups.google.com/group/symfony-users?hl=en

[symfony-users] Re: how get an object saved in session

2010-03-23 Thread Raphael Schumacher
See: http://www.symfony-project.org/jobeet/1_4/Doctrine/en/13 Subchapter "User Attributes" contains a note addressing the issue about storing objects directly: We could have feasibly stored the JobeetJob objects directly into the session. This is strongly discouraged because the session variables

[symfony-users] Re: Simple Form Question

2010-03-11 Thread Raphael Schumacher
Which action are you in, executeNew(), executeCreate(), executeEdit() or any other one? The thing in general is that the defaults are used for filling the widgets with default data when you render the form for displaying it to the user. It's not taken into the object itself when you are about to s

[symfony-users] Re: Unescaping HTML content

2010-03-11 Thread Raphael Schumacher
Have you verified (e.g. using your debugger) that the object's classnames are in reality what you should expect in theory? - the escaping strategy for your application? - the classname of $page object? (should be sfOutputEscaperObjectDecorator) - the classname of $page->$value property? (should be

[symfony-users] Re: about transfert of a symfony project

2010-03-11 Thread Raphael Schumacher
Ensure symfony and dev tools being properly installed on your new laptop, and copy your project files to the new laptop... --> is there anything specific that you would wish to hear as an answer? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-pro

[symfony-users] Re: Unescaping HTML content

2010-03-11 Thread Raphael Schumacher
Hi Romain, how about $page->getContent(ESC_RAW); or also: $page->getRawValue()->getContent(); ? With $page you are actually talking to a sfOutputEscaperObjectDecorator object, which holds your Page object in its $value property. See the __call method in class sfOutputEscaperObjectDecorato

[symfony-users] Re: Symfony 2 + Doctrine 2 : what about behaviours ?

2010-03-09 Thread Raphael Schumacher
Hi Benoit, I'm confused: do you mean Propel behaviors or Doctrine templates & listeners? Or something else? (I have never seen any behaviours in Doctrine.) Thanks, RAPHAEL -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received t

[symfony-users] Re: Question about sfWidgetFormChoice

2010-03-05 Thread Raphael Schumacher
array('' =>'-', range(14,130)) ...seems to me a bit a strange construction, a mix of associative and non-associative array elements. In any case the 'choices' option needs a associative array, so it may work better if you put together a proper associative array? E.g. like: $choices =array_merge(arr

[symfony-users] Re: change default sfRoute class

2010-02-16 Thread Raphael Schumacher
My apologies if I misunderstood your question, and perhaps you may elaborate a bit more on your specific situation. You want to replace sfRoute by your own class in general for all routes (unless explicitly specified in routing.yml)? What sort of routes have you then defined in routing.yml, e.g. sf

[symfony-users] Re: change default sfRoute class

2010-02-16 Thread Raphael Schumacher
Hi, I am at sfLive.. :-) One (maybe not the single possible) answer to your question: specify your custom route class in routing.yml. For the details, see the beginning of this chapter: http://www.symfony-project.org/reference/1_4/en/10-Routing Cheers, RAPHAEL -- You received this message bec

[symfony-users] Re: Help with Schema

2010-02-13 Thread Raphael Schumacher
Samuel, could you resolve the issue in a successful manner? Feedback is welcome, Raphael. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send

[symfony-users] Re: Can't figure out schema.yml relations

2010-02-11 Thread Raphael Schumacher
I may have had once the same problem in my early days with Doctrine, and, provided that I remember correctly, it was related to the definition of the local identifier used for the relation. In your case "uid": try whether declaring it as a integer(4) help to solve the problem. Strangely enough (or

[symfony-users] Re: Help with Schema

2010-02-09 Thread Raphael Schumacher
Your declaration of the many-many relationship between Campaign and AddressBook is not complete enough. In particular, search the "refClass" parameters are lacking in your schema.yml. Your schema as of now declares only these two 1--to-many relationships, which is not wrong but only half of the sto

[symfony-users] Re: Help with Schema

2010-02-09 Thread Raphael Schumacher
Can you maybe tell us at which step are you stuck? E.g. what errors you get? So we can focus on the problem... -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe f

[symfony-users] Re: Many-to-Many with extra fields

2010-02-05 Thread Raphael Schumacher
On 5 Feb., 15:24, Cainã wrote: [...] The problem with this association, in special, is that the FactPerson table has some extra fields, apart from the fact_id and the person_id fields. How could i create such form? [...] Assuming that you did define FactPerson in schema.yml, a FactPer

[symfony-users] Re: sfForm clean bind

2010-01-20 Thread Raphael Schumacher
Calling $form-setDefaults(null) resets all values in the form, that should work in principle (didn't try out yet). It's a sort of full reset, and the fields should get the defaults as If you desire the tainted values (the ones the user entered before validating them, you could use something like $f

[symfony-users] Re: Validator Equivalent to sfForm::useFields

2009-12-10 Thread Raphael Schumacher
I thought the useFields() method would appropriately care for the validators as well, so no further method needed for this? Cheers, RAPHAEL -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googl

[symfony-users] Re: Use of "--generate-in-cache" option in ::generate-module command

2009-08-07 Thread Raphael Schumacher
Thanks Eno for your reply, I'll be playing with it again asap taking attention to your suggestion. Then I'm also trying to understand in how the --generate -in-cache distinguishes itself from the admin generator stuff (doctrine:generate- admin command). Cheers, RAPHAEL --~--~-~--~~---

[symfony-users] Use of "--generate-in-cache" option in ::generate-module command

2009-08-06 Thread Raphael Schumacher
Hi there I am trying to appropriately understand what exactly the "--generate- in-cache" option does in the "doctrine:generate-module" command (also exists for propel). The only (and only) documentation on it that I could find says : - command-line help: " --generate-in-cache Generate the m

[symfony-users] Re: sfForm - add more option

2008-12-15 Thread Raphael Schumacher
Bernhard Your approach sounds very compelling. Especially as it allows saving the entire set of (new or existing) objects once and not before the user decides to save the entire session (or cancel, alternatively). But unfortunately I am not (yet) an advanced user of the form system in such a way