sfFormPropel is the base class for forms based on Propel objects.
Method Summary
-
doUpdateObject()
@see sfFormObject
-
embedI18n($cultures, $decorator)
Embeds i18n objects into the current form.
-
getConnection()
@return PropelPDO
-
string
getI18nFormClass()
Returns the name of the i18n form class.
-
string
getI18nModelName()
Returns the name of the i18n model.
-
Boolean
isI18n()
Returns true if the current form has some associated i18n objects.
-
string
processUploadedFile($field, $filename, $values)
Saves the uploaded file for the given field.
-
processValues()
Processes cleaned up values with user defined methods.
-
removeFile($field)
Removes the current file for the field.
-
string
saveFile($field, $filename, $file)
Saves the current file for the field.
-
updateDefaultsFromObject()
Updates the default values of the form with the current values of the current object.
-
__construct(, , )
Constructor.
bindAndSave , camelize , doSave , doUpdateObject , getConnection , getModelName , getObject , isNew , processValues , renderFormTag , save , saveEmbeddedForms , updateObject , updateObjectEmbeddedForms
Method Details
-
@see sfFormObject
-
embedI18n ($cultures, $decorator)
Browse code
| $cultures |
An array of cultures |
| $decorator |
A HTML decorator for the embedded form |
Embeds i18n objects into the current form.
-
@return PropelPDO
-
(string) getI18nFormClass ()
Browse code
Returns the name of the i18n form class.
returns The name of the i18n form class
-
(string) getI18nModelName ()
Browse code
Returns the name of the i18n model.
returns The name of the i18n model
-
Returns true if the current form has some associated i18n objects.
returns true if the current form has some associated i18n objects, false otherwise
-
(string) processUploadedFile ($field, $filename, $values)
Browse code
| $field |
The field name |
| $filename |
The file name of the file to save |
| $values |
An array of values |
Saves the uploaded file for the given field.
returns The filename used to save the file
-
Processes cleaned up values with user defined methods.
To process a value before it is used by the updateObject() method,
you need to define an updateXXXColumn() method where XXX is the PHP name
of the column. The method must return the processed value or false to remove the value
from the array of cleaned up values.
-
Removes the current file for the field.
-
(string) saveFile ($field, $filename, $file)
Browse code
| $field |
The field name |
| $filename |
The file name of the file to save |
| $file |
The validated file to save |
Saves the current file for the field.
returns The filename used to save the file
-
updateDefaultsFromObject ()
Browse code
Updates the default values of the form with the current values of the current object.
-
Constructor.
|