|
|
(15 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| This article describes the class ''I2CE_FormField_MAP''.
| | #REDIRECT [[Class: I2CE_FormField_MAP (4.1.7)]] |
| *Extends the class: [[Class: I2CE_FormField_MAPPED | I2CE_FormField_MAPPED]].
| |
| *Parent Classses: [[Class: I2CE_FormField_MAPPED | I2CE_FormField_MAPPED]] [[Class: I2CE_FormField_DB_STRING | I2CE_FormField_DB_STRING]] [[Class: I2CE_FormField | I2CE_FormField]] [[Class: I2CE_Fuzzy | I2CE_Fuzzy]]
| |
| *Child Classes:
| |
| ** [[Class: iHRIS_FormField_CURRENCY | iHRIS_FormField_CURRENCY]]
| |
| *Location: Part of the module [[I2CE Module List#Lists|Lists]] in the package [https://launchpad.net/i2ce I2CE]
| |
| *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.0-release/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_FormField_MAP.php modules/Forms/modules/Lists/lib/I2CE_FormField_MAP.php]
| |
| *Author: Luke Duncan <lduncan@intrahealth.org>
| |
| *Since: v3.2.0
| |
| Class for defining all the database fields used by a [[Class: I2CE_Form | ]] object.
| |
| ==Methods==
| |
| ===checkStyle_tree()===
| |
| Check to see if the tree style is allowed.
| |
| *Signature: public function checkStyle_tree()
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===create_DOMEditable_list()===
| |
| Creates a drop down list of options.
| |
| *Signature: protected function create_DOMEditable_list($node,$template,$form_node,$fields,$forms,$limits,$orders)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $node <br/>the node we wish to add the drop down list under @pararm array $fields
| |
| ** [[Class: I2CE_Template | I2CE_Template]] $template
| |
| **$form_node
| |
| **$fields
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $forms <br/>The selectable forms for this map. Order does not matter
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $limits <br/>An array, indexed by form name, of limiting data
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $orders <br/>An array, indexed by form name, of ordering data
| |
| *Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>DOMNode or an array of DOMNodes to add.
| |
| ===create_DOMEditable_tree()===
| |
| Creates a selectable auto-suggest tree view of the options
| |
| *Signature: protected function create_DOMEditable_tree($node,$template,$form_node,$fields,$forms,$limits,$orders)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $node <br/>the node that requested this drop down @pararm array $fields
| |
| ** [[Class: I2CE_Template | I2CE_Template]] $template
| |
| **$form_node
| |
| **$fields
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $forms <br/>The selectable forms for this map. Order does not matter
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $limits <br/>An array, indexed by form name, of limiting data
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $orders <br/>An array, indexed by form name, of ordering data
| |
| *Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>DOMNode or an array of DOMNodes to add.
| |
| ===getComponentizedValue()===
| |
| Componentizes the given $db_value based on component
| |
| *Signature: public function getComponentizedValue($db_value,$forms,$component)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $db_value <br/>The non-componentized value
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $forms <br/>of stirng. The form names which we wish to componentize.
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $component <br/>The component we wish to encode
| |
| *Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>The componentized db_value
| |
| ===getDBValue()===
| |
| Return the DB value for this form field.
| |
| *Signature: public function getDBValue()
| |
| *Returns: [http://www.php.net/manual/en/language.types.string.php string ]
| |
| ===getDefaultDisplayStyle()===
| |
| *Signature: public function getDefaultDisplayStyle($type)
| |
| *Parameters:
| |
| **$type
| |
| ===getDisplayValue()===
| |
| Returns the value of this field as a human readable format.
| |
| *Signature: public function getDisplayValue($entry)
| |
| *Parameters:
| |
| ** [[Class: I2CE_Entry | I2CE_Entry]] $entry <br/>If a I2CE_Entry object has been passed to this method then it will return the value for that entry assuming it's an entry for this field.
| |
| ***Default Value: false
| |
| *Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]
| |
| ===getFromDB()===
| |
| Return the value of this field from the database format for the given type.
| |
| *Signature: public function getFromDB($value)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value
| |
| ===getMappedForm()===
| |
| Get the form that this field maps to
| |
| *Signature: public function getMappedForm()
| |
| *Returns: string.
| |
| ===getMappedID()===
| |
| Get the id of the form that this field maps to If not set, returns 0.
| |
| *Signature: public function getMappedID()
| |
| *Returns: [http://www.php.net/manual/en/language.types.string.php string ]
| |
| ===getSQLComponentization()===
| |
| Componentizes the given $db_value based on component
| |
| *Signature: public function getSQLComponentization($db_ref,$forms,$component)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $db_ref <br/>The reference to the data
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $forms <br/>of stirng. The form names which we wish to componentize.
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $component <br/>The component we wish to encode
| |
| *Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>The componentized db_value
| |
| ===getValue()===
| |
| Return the native value for this form field.
| |
| *Signature: public function getValue()
| |
| *Returns: [http://www.php.net/manual/en/language.types.array.php array ]
| |
| ===isValid()===
| |
| Checks to see if the current value for this is set and valid.
| |
| *Signature: public function isValid()
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===issetValue()===
| |
| Checks to see if the value has been set.
| |
| *Signature: public function issetValue()
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===setFromPost()===
| |
| Sets the value of this field from the posted form.
| |
| *Signature: public function setFromPost($post)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $post <br/>The $_POST array holding the values for this form.
| |
| | |
| | |
| [[Category:Class Documentation]]
| |