Hi,

I saw in the jobeet doctrine tutorial a method of having a function in
your form the would generate filenames for uploaded files:

if a generateLogoFilename() method exists in the form, it will be
called by the validator and the result will override the default
generated logo  filename. The method is given the sfValidatedFile
object as an argument.

This wasn't working for me so I went to the source code and saw on
line, 503 of sfValidatorFile.class.php

else if (method_exists($this->object, $method))

I changed this to :

else if (method_exists($this, $method))

and now the code works the way the doc says (the function is in the
form class).  The way the code was working the generate[column]Filename
() would have to be in the model class.  I also noticed that the
function name is not expecting a camelCase version of the column name,
which sort of goes against convention.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to