Class: I2CE FormField MAP
This article describes the class I2CE_FormField_MAP.
- Extends the class: I2CE_FormField_MAPPED.
- Parent Classses: I2CE_FormField_MAPPED I2CE_FormField_DB_STRING I2CE_FormField I2CE_Fuzzy
- Child Classes:
- Location: Part of the module Lists in the package I2CE
- Source: Defined in the file 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 object.
Methods
checkStyle_tree()
Check to see if the tree style is allowed.
- Signature: public function checkStyle_tree()
- Returns: 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:
- DOMNode $node
the node we wish to add the drop down list under @pararm array $fields - I2CE_Template $template
- $form_node
- $fields
- array $forms
The selectable forms for this map. Order does not matter - array $limits
An array, indexed by form name, of limiting data - array $orders
An array, indexed by form name, of ordering data
- DOMNode $node
- Returns: mixed
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:
- DOMNode $node
the node that requested this drop down @pararm array $fields - I2CE_Template $template
- $form_node
- $fields
- array $forms
The selectable forms for this map. Order does not matter - array $limits
An array, indexed by form name, of limiting data - array $orders
An array, indexed by form name, of ordering data
- DOMNode $node
- Returns: mixed
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:
- Returns: string
The componentized db_value
getDBValue()
Return the DB value for this form field.
- Signature: public function getDBValue()
- Returns: 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:
- I2CE_Entry $entry
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
- I2CE_Entry $entry
- Returns: mixed
getFromDB()
Return the value of this field from the database format for the given type.
- Signature: public function getFromDB($value)
- Parameters:
- 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: string
getSQLComponentization()
Componentizes the given $db_value based on component
- Signature: public function getSQLComponentization($db_ref,$forms,$component)
- Parameters:
- Returns: string
The componentized db_value
getValue()
Return the native value for this form field.
- Signature: public function getValue()
- Returns: array
isValid()
Checks to see if the current value for this is set and valid.
- Signature: public function isValid()
- Returns: boolean
issetValue()
Checks to see if the value has been set.
- Signature: public function issetValue()
- Returns: boolean
setFromPost()
Sets the value of this field from the posted form.
- Signature: public function setFromPost($post)
- Parameters:
- array $post
The $_POST array holding the values for this form.
- array $post