Public Member Functions | |
| addFromField (array $field, $isI18n=false) | |
| addFromRelated (array $related) | |
| addFromFieldFilter (array $field) | |
| addFromRelatedFilter (array $related) | |
| getFromFieldPrm (array $field) | |
| setSubmitText ($text) | |
| setSubmitPlus ($text) | |
| __toString () | |
| to ($type) | |
| finalize () | |
| toHtml () | |
| toXul () | |
| isValid () | |
| isI18n () | |
| getErrors () | |
| hasErrors () | |
| addCustomError ($field, $error) | |
| add ($type, array $prm=array(), $isI18n=false) | |
| has ($name) | |
| get ($name) | |
| del ($name) | |
| reOrder (array $order) | |
| reOrderSection (array $order) | |
| getValue ($name) | |
| getValues ($onlyFilled=false, $ignoreWhitePassword=true) | |
| addNotValue ($name) | |
| getNames () | |
| setValue ($name, $value, $refill=false) | |
| setValues (array $data, $refill=false) | |
| isBound () | |
| setBound ($bound) | |
| refill () | |
| getNew ($type, array $prm) | |
| addSection ($name) | |
| setSection ($search) | |
| setSectionName ($name, $search=null) | |
| moveToSection ($name, $section=null) | |
| setMode ($mode, $force=true) | |
| firstSection () | |
| lastSection () | |
| getSection () | |
| set ($key1, $key2, $val) | |
| __set ($key, $val) | |
| __clone () | |
| getAttr ($name) | |
| setAttr ($name, $value) | |
| getCfg () | |
Protected Member Functions | |
| afterInit () | |
| addCaptcha () | |
| beforeInit () | |
Protected Attributes | |
| $elements = array() | |
| $i18nElements = array() | |
| $section = array() | |
| $elementsSection = array() | |
| $curSection = 0 | |
| $hasFiles = 0 | |
| $isBound = false | |
| $errors = array() | |
| $customErrors = array() | |
| $captchaAdded = false | |
| $cfg | |
class for create form directly from the db fields
Definition at line 10 of file form/db.class.php.
| __clone | ( | ) | [inherited] |
Used when cloning the form to create new field element
Definition at line 768 of file form.class.php.
| __set | ( | $ | key, | |
| $ | val | |||
| ) | [inherited] |
Definition at line 761 of file form.class.php.
| __toString | ( | ) | [inherited] |
Transform the element to a string to be shown, with the courant output
Definition at line 112 of file form.class.php.
| add | ( | $ | type, | |
| array $ | prm = array(), |
|||
| $ | isI18n = false | |||
| ) | [inherited] |
Add a form element in the current section
| string|form_abstract | $type Form element type or element form | |
| array | $prm Parameter array for the element | |
| bool | $isI18n |
Definition at line 343 of file form.class.php.
| addCaptcha | ( | ) | [protected, inherited] |
Add a captcha if parametred and not already added
Definition at line 740 of file form.class.php.
| addCustomError | ( | $ | field, | |
| $ | error | |||
| ) | [inherited] |
Add a custom error
| string | $field Filed name to be associate with | |
| string | $error The error text |
Definition at line 325 of file form.class.php.
| addFromField | ( | array $ | field, | |
| $ | isI18n = false | |||
| ) |
Add a form element regarding the field information
| array | $field Field information | |
| bool | $isI18n |
Definition at line 19 of file form/db.class.php.
| addFromFieldFilter | ( | array $ | field | ) |
Add a form element regarding the field information, especially for a filter
| array | $field Field information |
Definition at line 67 of file form/db.class.php.
| addFromRelated | ( | array $ | related | ) |
Add a form element for a related filter
| array | $related |
Definition at line 29 of file form/db.class.php.
| addFromRelatedFilter | ( | array $ | related | ) |
Add a form element for a related filter, especially for a filter
| array | $related |
Definition at line 121 of file form/db.class.php.
| addNotValue | ( | $ | name | ) | [inherited] |
Add field to be considered as a non value (ie non attribued in getValues)
| string | $name |
Definition at line 525 of file form.class.php.
| addSection | ( | $ | name | ) | [inherited] |
Add a new section
| string | $name Section name |
Definition at line 623 of file form.class.php.
| afterInit | ( | ) | [protected, inherited] |
Add the first section from the configuration file
Reimplemented from object.
Definition at line 85 of file form.class.php.
| beforeInit | ( | ) | [protected, inherited] |
Call just before the configuration initialisation
Reimplemented in form_file.
Definition at line 35 of file object.class.php.
| del | ( | $ | name | ) | [inherited] |
| finalize | ( | ) | [inherited] |
Finalize the construction of the form. Should be call when i18n are present
Definition at line 220 of file form.class.php.
| firstSection | ( | ) | [inherited] |
Set the section to the first
Definition at line 717 of file form.class.php.
| get | ( | $ | name | ) | [inherited] |
Get a form element
| string | $name Field name |
Definition at line 384 of file form.class.php.
| getAttr | ( | $ | name | ) | [inherited] |
Get an attribute
| string | $name Attribute name |
Reimplemented in response_proxy.
Definition at line 48 of file object.class.php.
| getCfg | ( | ) | [inherited] |
| getErrors | ( | ) | [inherited] |
Get all the errors for the last validation
Definition at line 306 of file form.class.php.
| getFromFieldPrm | ( | array $ | field | ) |
Get a form element array parameter regarding the field information
| array | $field Field information |
Definition at line 152 of file form/db.class.php.
| getNames | ( | ) | [inherited] |
| getNew | ( | $ | type, | |
| array $ | prm | |||
| ) | [inherited] |
Get a form element for the form type
| string | $type Form element type | |
| array | $prm Parameter array for the element |
Definition at line 611 of file form.class.php.
| getSection | ( | ) | [inherited] |
| getValue | ( | $ | name | ) | [inherited] |
Get the actual value for 1 field
| string | $name Field name |
Definition at line 469 of file form.class.php.
| getValues | ( | $ | onlyFilled = false, |
|
| $ | ignoreWhitePassword = true | |||
| ) | [inherited] |
Get all the values field
| bool | $onlyFilled | |
| bool | $ignoreWhitePassword |
Definition at line 483 of file form.class.php.
| has | ( | $ | name | ) | [inherited] |
Check if the form has a element
| string | $name Field name |
Definition at line 374 of file form.class.php.
| hasErrors | ( | ) | [inherited] |
Check if the form has errors (only if a validations was done)
Definition at line 315 of file form.class.php.
| isBound | ( | ) | [inherited] |
| isI18n | ( | ) | [inherited] |
| isValid | ( | ) | [inherited] |
Check if all the form elements are valid
Definition at line 278 of file form.class.php.
| lastSection | ( | ) | [inherited] |
Set the section to the last
Definition at line 724 of file form.class.php.
| moveToSection | ( | $ | name, | |
| $ | section = null | |||
| ) | [inherited] |
Move a field to another section
| string | $name Fieldname | |
| int | $section Section Number. If null, current section will be used |
Definition at line 686 of file form.class.php.
| refill | ( | ) | [inherited] |
Refill the whole form from the post argument
Definition at line 592 of file form.class.php.
| reOrder | ( | array $ | order | ) | [inherited] |
Reorder the fields in the current section
| array | $order Array containing the field names in order wanted |
Definition at line 407 of file form.class.php.
| reOrderSection | ( | array $ | order | ) | [inherited] |
Reorder the sections
| array | $order Array containing either the section index or the section name |
Definition at line 428 of file form.class.php.
| set | ( | $ | key1, | |
| $ | key2, | |||
| $ | val | |||
| ) | [inherited] |
Set configuration var with a depth of 2
| string | $key1 The 1st index | |
| string | $key2 The 2nd index | |
| mixed | $val The value |
Definition at line 757 of file form.class.php.
| setAttr | ( | $ | name, | |
| $ | value | |||
| ) | [inherited] |
Set an attribute
| string | $name Attribute name | |
| mixed | $value Attribute value |
Reimplemented in response_proxy.
Definition at line 58 of file object.class.php.
| setBound | ( | $ | bound | ) | [inherited] |
| setMode | ( | $ | mode, | |
| $ | force = true | |||
| ) | [inherited] |
Change the mode of the form
| string | $mode edit or view | |
| bool | $force True to reaffect all the field |
Definition at line 705 of file form.class.php.
| setSection | ( | $ | search | ) | [inherited] |
Set the current section
| int|string | $search Section index or section name |
Definition at line 636 of file form.class.php.
| setSectionName | ( | $ | name, | |
| $ | search = null | |||
| ) | [inherited] |
Set a section name
| string | $name Section name to set | |
| null|int|string | $search null to set to the current section, int or string to search a section |
Definition at line 659 of file form.class.php.
| setSubmitPlus | ( | $ | text | ) | [inherited] |
| setSubmitText | ( | $ | text | ) | [inherited] |
| setValue | ( | $ | name, | |
| $ | value, | |||
| $ | refill = false | |||
| ) | [inherited] |
Set a field value
| string | $name Field name | |
| mixed | $value | |
| boolean | $refill Indicate if the value is a refill one |
Definition at line 546 of file form.class.php.
| setValues | ( | array $ | data, | |
| $ | refill = false | |||
| ) | [inherited] |
Set values to the form elements
| array | $data | |
| boolean | $refill Indicate if the value is a refill one |
Definition at line 562 of file form.class.php.
| to | ( | $ | type | ) | [inherited] |
Transform the element to a string to be shown
| string | $type The output type |
Definition at line 129 of file form.class.php.
| toHtml | ( | ) | [inherited] |
Transform the form in HTML
Definition at line 262 of file form.class.php.
| toXul | ( | ) | [inherited] |
Transform the form in XUL
Definition at line 269 of file form.class.php.
$captchaAdded = false [protected, inherited] |
Definition at line 80 of file form.class.php.
$cfg [protected, inherited] |
Definition at line 17 of file object.class.php.
$curSection = 0 [protected, inherited] |
Definition at line 45 of file form.class.php.
$customErrors = array() [protected, inherited] |
Definition at line 73 of file form.class.php.
$elements = array() [protected, inherited] |
Definition at line 17 of file form.class.php.
$elementsSection = array() [protected, inherited] |
Definition at line 38 of file form.class.php.
$errors = array() [protected, inherited] |
Definition at line 66 of file form.class.php.
$hasFiles = 0 [protected, inherited] |
Definition at line 52 of file form.class.php.
$i18nElements = array() [protected, inherited] |
Definition at line 24 of file form.class.php.
$isBound = false [protected, inherited] |
Definition at line 59 of file form.class.php.
$section = array() [protected, inherited] |
Definition at line 31 of file form.class.php.
1.7.1