Class: I2CE List (Development): Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
*Extends the class: [[Class: I2CE_Form (Development) | I2CE_Form]].
*Extends the class: [[Class: I2CE_Form (Development) | I2CE_Form]].
*Child Classes:
*Child Classes:
** [[Class: iHRIS_Contact (Development) | iHRIS_Contact]]
** [[Class: iHRIS_Currency (Development) | iHRIS_Currency]]
** [[Class: iHRIS_Country (Development) | iHRIS_Country]]
** [[Class: I2CE_SimpleList (Development) | I2CE_SimpleList]]
** [[Class: I2CE_SimpleList (Development) | I2CE_SimpleList]]
** [[Class: iHRIS_Job (Development) | iHRIS_Job]]
*** [[Class: I2CE_SimpleCodedList (Development) | I2CE_SimpleCodedList]]
**** [[Class: iHRIS_DHIS_CodedList (Development) | iHRIS_DHIS_CodedList]]
*** [[Class: iHRIS_PersonID_Type (Development) | iHRIS_PersonID_Type]]
** [[Class: iHRIS_UserMap (Development) | iHRIS_UserMap]]
** [[Class: I2CE_User_Form (Development) | I2CE_User_Form]]
*** [[Class: I2CE_User_Request (Development) | I2CE_User_Request]]
** [[Class: iHRIS_Position (Development) | iHRIS_Position]]
** [[Class: iHRIS_Position (Development) | iHRIS_Position]]
*** [[Class: iHRIS_MultiPosition (Development) | iHRIS_MultiPosition]]
** [[Class: iHRIS_Cadre (Development) | iHRIS_Cadre]]
** [[Class: iHRIS_Cadre (Development) | iHRIS_Cadre]]
** [[Class: iHRIS_TrainingProgram (Development) | iHRIS_TrainingProgram]]
** [[Class: iHRIS_Competency (Development) | iHRIS_Competency]]
** [[Class: iHRIS_Scheduled_Training_Course (Development) | iHRIS_Scheduled_Training_Course]]
** [[Class: iHRIS_Scheduled_Training_Course (Development) | iHRIS_Scheduled_Training_Course]]
** [[Class: iHRIS_Training_Course (Development) | iHRIS_Training_Course]]
** [[Class: iHRIS_Training_Course (Development) | iHRIS_Training_Course]]
** [[Class: iHRIS_ContinuingEducationCourse (Development) | iHRIS_ContinuingEducationCourse]]
** [[Class: iHRIS_ContinuingEducationCourse (Development) | iHRIS_ContinuingEducationCourse]]
** [[Class: iHRIS_Currency (Development) | iHRIS_Currency]]
** [[Class: iHRIS_DataElement (Development) | iHRIS_DataElement]]
** [[Class: iHRIS_DataSet (Development) | iHRIS_DataSet]]
** [[Class: iHRIS_ListByCountry (Development) | iHRIS_ListByCountry]]
** [[Class: iHRIS_ListByCountry (Development) | iHRIS_ListByCountry]]
*** [[Class: iHRIS_Facility (Development) | iHRIS_Facility]]
*** [[Class: iHRIS_Facility (Development) | iHRIS_Facility]]
**** [[Class: iHRIS_HealthFacility (Development) | iHRIS_HealthFacility]]
**** [[Class: iHRIS_HealthFacility (Development) | iHRIS_HealthFacility]]
*** [[Class: iHRIS_QualifyTrainingInstitution (Development) | iHRIS_QualifyTrainingInstitution]]
*** [[Class: iHRIS_QualifyTrainingInstitution (Development) | iHRIS_QualifyTrainingInstitution]]
** [[Class: iHRIS_Country (Development) | iHRIS_Country]]
** [[Class: iHRIS_County (Development) | iHRIS_County]]
** [[Class: iHRIS_County (Development) | iHRIS_County]]
** [[Class: iHRIS_District (Development) | iHRIS_District]]
** [[Class: iHRIS_District (Development) | iHRIS_District]]
Line 24: Line 29:
** [[Class: I2CE_Form_Locale (Development) | I2CE_Form_Locale]]
** [[Class: I2CE_Form_Locale (Development) | I2CE_Form_Locale]]
** [[Class: iHRIS_Degree (Development) | iHRIS_Degree]]
** [[Class: iHRIS_Degree (Development) | iHRIS_Degree]]
** [[Class: I2CE_ArchivedReport (Development) | I2CE_ArchivedReport]]
** [[Class: I2CE_Role (Development) | I2CE_Role]]
** [[Class: I2CE_Role (Development) | I2CE_Role]]
** [[Class: iHRIS_EstablishmentPeriod (Development) | iHRIS_EstablishmentPeriod]]
** [[Class: iHRIS_Establishment (Development) | iHRIS_Establishment]]
** [[Class: iHRIS_Classification (Development) | iHRIS_Classification]]
** [[Class: iHRIS_Classification (Development) | iHRIS_Classification]]
** [[Class: iHRIS_SalaryGrade (Development) | iHRIS_SalaryGrade]]
** [[Class: iHRIS_SalaryGrade (Development) | iHRIS_SalaryGrade]]
** [[Class: iHRIS_Job (Development) | iHRIS_Job]]
*** [[Class: iHRIS_ManageJob (Development) | iHRIS_ManageJob]]
** [[Class: iHRIS_Department (Development) | iHRIS_Department]]
** [[Class: iHRIS_Department (Development) | iHRIS_Department]]
** [[Class: iHRIS_ConfirmationType (Development) | iHRIS_ConfirmationType]]
** [[Class: iHRIS_Certificate (Development) | iHRIS_Certificate]]
** [[Class: iHRIS_Certificate (Development) | iHRIS_Certificate]]
** [[Class: iHRIS_DisciplinaryActionReason (Development) | iHRIS_DisciplinaryActionReason]]
** [[Class: iHRIS_DisciplinaryActionReason (Development) | iHRIS_DisciplinaryActionReason]]
** [[Class: iHRIS_TrainingDisruptionReason (Development) | iHRIS_TrainingDisruptionReason]]
** [[Class: iHRIS_TrainingDisruptionReason (Development) | iHRIS_TrainingDisruptionReason]]
** [[Class: iHRIS_TrainingProgram (Development) | iHRIS_TrainingProgram]]
** [[Class: iHRIS_ISCO_08_Major (Development) | iHRIS_ISCO_08_Major]]
** [[Class: iHRIS_ISCO_08_Major (Development) | iHRIS_ISCO_08_Major]]
** [[Class: iHRIS_ISCO_08_Sub_Major (Development) | iHRIS_ISCO_08_Sub_Major]]
** [[Class: iHRIS_ISCO_08_Sub_Major (Development) | iHRIS_ISCO_08_Sub_Major]]
** [[Class: iHRIS_ISCO_08_Minor (Development) | iHRIS_ISCO_08_Minor]]
** [[Class: iHRIS_ISCO_08_Unit (Development) | iHRIS_ISCO_08_Unit]]
** [[Class: iHRIS_ISCO_88_Major (Development) | iHRIS_ISCO_88_Major]]
** [[Class: iHRIS_ISCO_88_Major (Development) | iHRIS_ISCO_88_Major]]
** [[Class: iHRIS_ISCO_88_Sub_Major (Development) | iHRIS_ISCO_88_Sub_Major]]
** [[Class: iHRIS_ISCO_88_Sub_Major (Development) | iHRIS_ISCO_88_Sub_Major]]
** [[Class: iHRIS_ISCO_88_Minor (Development) | iHRIS_ISCO_88_Minor]]
** [[Class: iHRIS_ISCO_88_Minor (Development) | iHRIS_ISCO_88_Minor]]
** [[Class: iHRIS_ISCO_88_Unit (Development) | iHRIS_ISCO_88_Unit]]
** [[Class: iHRIS_ISCO_88_Unit (Development) | iHRIS_ISCO_88_Unit]]
** [[Class: iHRIS_Competency (Development) | iHRIS_Competency]]
** [[Class: iHRIS_Training_Course_Evaluation (Development) | iHRIS_Training_Course_Evaluation]]
** [[Class: iHRIS_Training_Course_Evaluation (Development) | iHRIS_Training_Course_Evaluation]]
*Location: Part of the module [[I2CE Module List (Development)#Lists|Lists]] in the package [https://launchpad.net/i2ce I2CE] 4.0-dev
*Location: Part of the module [[I2CE Module List (Development)#Lists|Lists]] in the package [https://launchpad.net/i2ce I2CE] 4.1-dev
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L38 modules/Forms/modules/Lists/lib/I2CE_List.php] on line 38
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L38 modules/Forms/modules/Lists/lib/I2CE_List.php] on line 38
*Author: Luke Duncan <lduncan@intrahealth.org>
*Author: Luke Duncan <lduncan@intrahealth.org>
*Since: v1.0.0
*Since: v1.0.0
Line 45: Line 60:
==Form Fields==
==Form Fields==
This class is a [[Class: I2CE_Form (Development) |form class]] and provides the following [[Class: I2CE_FormField (Development) |form fields]]
This class is a [[Class: I2CE_Form (Development) |form class]] and provides the following [[Class: I2CE_FormField (Development) |form fields]]
===remap===
The form field ''remap'' is implemented by [[Class: I2CE_FormField_REMAP (Development) |REMAP ]]
===i2ce_hidden===
===i2ce_hidden===
The form field ''i2ce_hidden'' is implemented by [[Class: I2CE_FormField_YESNO (Development) |YESNO ]]
The form field ''i2ce_hidden'' is implemented by [[Class: I2CE_FormField_YESNO (Development) |YESNO ]]
==Constants==
===I2CE_List::MAIN_FIELD===
The main field name used for display a description of a record.
Defined as: "name"
===I2CE_List::SEC_FIELD===
The secondary field name used for displaying a description of a record in combination with the MAIN_FIELD.
Defined as: null
===I2CE_List::SORT_FIELD===
The sort field name to be used for sorting the display list.  This can't be used with the SEC_FIELD option for display.
Defined as: null
==Variables==
==Variables==
===$mapped_fields_by_form===
of array index by names of lists of arrays where keys are form names, values are arrays with keys field names and values field objects
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L59 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 59
*Type: static protected [http://www.php.net/manual/en/language.types.array.php array ] $mapped_fields_by_form
===$cache===
===$cache===
An array to cache lookup entries Any lookups done to the database will be cached in this static array so additional lookups using the same id won't have to access the database. @static
An array to cache lookup entries Any lookups done to the database will be cached in this static array so additional lookups using the same id won't have to access the database. @static
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L61 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 61
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L118 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 118
*Type: static protected [http://www.php.net/manual/en/language.types.array.php array ] $cache
*Type: static protected [http://www.php.net/manual/en/language.types.array.php array ] $cache


==Methods==
==Methods==
===_flattenDataTree()===
===_findLowerMatches()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L961 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 961
Internal method to find all the ids for forms that are below the given matched form id.  This will go through the list of fields until the form that is being matched is found. @param string $match The form id to match at the top.
*Signature: static protected function _flattenDataTree($data,$list)
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L578 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 578
*Signature: static protected function _findLowerMatches($match_form,$match_ids,$fields,$forms,$displayed,$show_hidden)
*Parameters:
**$match_form
**$match_ids
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>The getDisplayedFields() for the field object.
** [http://www.php.net/manual/en/language.types.array.php array ] $forms <br/>The getSelectableForms() for the field object.
** [http://www.php.net/manual/en/language.types.array.php array ] $displayed <br/>A list of forms that should be included in the results.
** [http://www.php.net/manual/en/language.types.integer.php int ] $show_hidden <br/>0=non-hidden, 1=All, 2=hidden only.  Defaults to 0
***Default Value: 0
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===_getDisplayFields()===
Worker function to get the display fields
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L217 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 217
*Signature: protected function _getDisplayFields($style)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $style <br/>Defaults to 'default'
***Default Value: 'default'
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string
===_getDisplayString()===
worker method to get the display string
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L226 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 226
*Signature: protected function _getDisplayString($style)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $style <br/>Defaults to 'default'
***Default Value: 'default'
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===_getSortFields()===
Worker function to get the display fields
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L323 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 323
*Signature: protected function _getSortFields($style)
*Parameters:
*Parameters:
**$data
** [http://www.php.net/manual/en/language.types.string.php string ] $style <br/>Defaults to 'default'
**&$list
***Default Value: 'default'
===_monsterMash()===
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string
Gets the id's for a form that live at @param string $use_display value.  Defaults to true in which case the displayed fields are returned based on the display value. If false, then the displa @param string $use_display value.  Defaults to true in which case the displayed fields are returned based on the display value. If false, then the displa
===_searchLowerMatches()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L340 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 340
Internal method to search all the ids for forms that are below the given matched form id. @param string $match The form id to match at the top.
*Signature: static protected function _monsterMash($options,$form_name,$opt_field,$opt_form,$opt_id,$sub_fields,$sub_val,$display_fields,$use_display_value,$show_hidden)
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L605 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 605
*Signature: static protected function _searchLowerMatches($match_form,$match_ids,$fields,$forms,$displayed,$show_hidden)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] &$options <br/>Where the id's are saved.  Array with keys the ids of $form_name. For values, if $use_dislpay_value is true, then the displayed fields for $form_name that corresponds to that value.  If $use_display_fields is false, then we return an array of the display fields
**$match_form
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name
**$match_ids
** stirng $opt_field <br/>The field we are limiting $form_name on.
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>The getDisplayedFields() for the field object.
** stirng $opt_form <br/>The form we wish to look that $opt_field takes values in
** [http://www.php.net/manual/en/language.types.array.php array ] $forms <br/>The getSelectableFroms() for the field object.
** [http://www.php.net/manual/en/language.types.string.php string ] $opt_id <br/>The id wish to look that $opt_field takes values.  e.g. we are looking for all instances of $form_name where $opt_field  is $opt_form|$opt_id
** [http://www.php.net/manual/en/language.types.array.php array ] $displayed <br/>A list of forms that should be included in the results.
** artary $sub_fields <br/>Example  array(county+district,district+region,[region])
** [http://www.php.net/manual/en/language.types.integer.php int ] $show_hidden <br/>0=non-hidden, 1=All, 2=hidden only.
** [http://www.php.net/manual/en/language.types.string.php string ] $sub_val <br/>Defaults to ''. If use_display_value is set, a string we prepend to the displayed fields for the id
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
***Default Value: ''
** [http://www.php.net/manual/en/language.types.array.php array ] $display_fields <br/>The fields which we use to populate $options with.  Defaults to an empty array in which case the value of $options is the display fields registered for this form .
***Default Value: array()
**$use_display_value
***Default Value: true
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $show_hidden <br/>Show the hidden members of the list, defaults to false.
***Default Value: false
       
===addCache()===
===addCache()===
Adds the id  number to the cache . @param integer $code The code of the entry to add.
Adds the id  number to the cache . @param integer $code The code of the entry to add.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L570 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 570
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L518 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 518
*Signature: static final protected function addCache($table_name,$id,$value)
*Signature: static final protected function addCache($table_name,$id,$value)
*Parameters:
*Parameters:
Line 98: Line 133:
**$id  
**$id  
** [http://www.php.net/manual/en/language.types.string.php string ] $value <br/>The value to add to the cache
** [http://www.php.net/manual/en/language.types.string.php string ] $value <br/>The value to add to the cache
===buildDataTree()===
Create a data tree of the selectable forms.  Deisgned to be fed into tree select
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L557 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 557
*Signature: static public function buildDataTree($fields,$forms,$limits,$orders,$show_hidden)
*Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>an ordered array E.g array('village+county','county','district,'region+country','country'). it is an "bottom up" array of string where strings are of the form "$form" or "$form+$link_field". In the case of the former type, then $link_field is assumed to be the next form.  So for example, "county" has link field "district".  If a "$form(+$link_field)" is surrounded by brackets [ ] , it is not displayed.
** [http://www.php.net/manual/en/language.types.array.php array ] $forms <br/>An unorderd array of form names whose values we allow to be selected
** [http://www.php.net/manual/en/language.types.array.php array ] $limits <br/>An array with keys form names and value limit data
** [http://www.php.net/manual/en/language.types.array.php array ] $orders <br/>An array with keys form names and values array of field orders for that form.  If the form name has no orders, we use default ordering for that form based on its displayed firelds
***Default Value: array()
** [http://www.php.net/manual/en/language.types.integer.php int ] $show_hidden <br/>0=non-hidden, 1=All, 2=hidden only.  Defaults to 0
***Default Value: 0
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===componentizeQuery()===
===componentizeQuery()===
returns the posible componentization of a form|id
returns the posible componentization of a form|id
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L72 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 72
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L129 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 129
*Signature: static public function componentizeQuery($qry,$forms,$component)
*Signature: static public function componentizeQuery($qry,$forms,$component)
*Parameters:
*Parameters:
Line 107: Line 155:
**$component  
**$component  
*Returns: string.<br/>They query need to turn $qry into one componentized to $component.
*Returns: string.<br/>They query need to turn $qry into one componentized to $component.
===createDataTree()===
===findLowerMatches()===
Create a data tree of the selectable forms. Deisgned to be fed into tree select
For the list of displayed fields for a field, find all the ids for forms that are below the given matched form id. For example if a location has the displayed fields of: array( 'county', 'district', '[region]', 'country' ) with selectable fields: array( 'county', 'district' ) if you want to match the district: district|10 this method will return all the county ids that are in district|10.  This will also return 'district|10' in the list to have a complete list of valid selectable forms.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L768 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 768
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L655 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 655
*Signature: static public function createDataTree($fields,$forms,$limits,$orders,$display_first,$major_separator,$minor_separator,$show_hidden)
*Signature: static public function findLowerMatches($match,$fields,$forms,$show_hidden)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>an ordered array E.g array('village+county','county','district,'region+country','country'). it is an "bottom up" array of string where strings are of the form "$form" or "$form+$link_field".  In the case of the former type, then $link_field is assumed to be the next form.  So for example, "county" has link field "district". If a "$form(+$link_field)" is surrounded by brackets [ ] , it is not displayed.
** [http://www.php.net/manual/en/language.types.string.php string ] $match <br/>The form id to match at the top.
** [http://www.php.net/manual/en/language.types.array.php array ] $forms <br/>An unorderd array of form names whose values we allow to be selected
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>The getDisplayedFields() for the field object.
** [http://www.php.net/manual/en/language.types.array.php array ] $limits <br/>An array with keys form names and value limit data
** [http://www.php.net/manual/en/language.types.array.php array ] $forms <br/>The getSelectableFroms() for the field object.
** [http://www.php.net/manual/en/language.types.array.php array ] $orders <br/>An array with keys form names and values array of field orders for that form. If the form name has no orders, we use default ordering for that form based on its displayed firelds
** [http://www.php.net/manual/en/language.types.integer.php int ] $show_hidden <br/>0=non-hidden, 1=All, 2=hidden onlyDefaults to 0
***Default Value: array()
***Default Value: 0
**$display_first
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
***Default Value: true
** [http://www.php.net/manual/en/language.types.string.php string ] $major_separator <br/>The seperator between the start display value and the extended display valuesIf null, then the title is an array of values
***Default Value: ' - '
** [http://www.php.net/manual/en/language.types.string.php string ] $minor_separator <br/>The sepeartor between the extended display values
***Default Value: ' '
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $show_hidden <br/>Show the hidden members of the list, defaults to false.
***Default Value: false
===flattenDataTree()===
===flattenDataTree()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L954 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 954
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L561 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 561
*Signature: static public function flattenDataTree($data)
*Signature: static public function flattenDataTree($data)
*Parameters:
*Parameters:
Line 132: Line 173:
===getCache()===
===getCache()===
Return the cache cached entry for the id  number. @param integer $code The code of the entry to lookup.
Return the cache cached entry for the id  number. @param integer $code The code of the entry to lookup.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L583 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 583
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L531 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 531
*Signature: static final protected function getCache($table_name,$id)
*Signature: static final protected function getCache($table_name,$id)
*Parameters:
*Parameters:
Line 138: Line 179:
**$id  
**$id  
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>The value of the cached code.
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>The value of the cached code.
===getDisplayFieldStyles()===
Returns a list of fields used for displaying this list.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L282 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 282
*Signature: static public function getDisplayFieldStyles($form_name,$style)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name
** [http://www.php.net/manual/en/language.types.string.php string ] $style <br/>Defaults to 'default'
***Default Value: 'default'
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===getDisplayFields()===
===getDisplayFields()===
Returns a list of fields used for displaying this list.
Returns a list of fields used for displaying this list.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L495 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 495
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L260 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 260
*Signature: static public function getDisplayFields($form_name)
*Signature: static public function getDisplayFields($form_name,$style)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name
** [http://www.php.net/manual/en/language.types.string.php string ] $style <br/>Defaults to 'default'
***Default Value: 'default'
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===getExtendedDisplay()===
===getDisplayString()===
get an exended display for a field value
Returns display string used for displaying this list.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L602 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 602
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L238 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 238
*Signature: static public function getExtendedDisplay($fields,$start_value,$major_separator,$minor_separator)
*Signature: static public function getDisplayString($form_name,$style)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>An ordered array E.g array('village+county','county','district,'region+country','country'). it is an "bottom up" array of string where strings are of the form "$form" or "$form+$link_field".  In the case of the former type, then $link_field is assumed to be the next form.  So for example, "county" has link field "district". If a "$form(+$link_field)" is surrounded by brackets [ ] , it is not displayed.
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name
** [http://www.php.net/manual/en/language.types.string.php string ] $start_value <br/>E.g. "village|10"
** [http://www.php.net/manual/en/language.types.string.php string ] $style <br/>Defaults to 'default'
** [http://www.php.net/manual/en/language.types.string.php string ] $major_separator <br/>The seperator between the start display value and the extended display values. If null, we return an array.
***Default Value: 'default'
***Default Value: ' - '
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
** [http://www.php.net/manual/en/language.types.string.php string ] $minor_separator <br/>The sepeartor between the extended display values
===getFieldsMappingToList()===
***Default Value: ' '
Get all fields mapping to the given list type
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>or array
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L65 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 65
*Signature: static public function getFieldsMappingToList($list)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $list <br/>Either a string a list name or isntance of {I2CE_List}
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>keys are form names, values are arrays with keys field names and values field objects
===getHTMLTemplate()===
===getHTMLTemplate()===
Return the HTML file name for the form template for this form.
Return the HTML file name for the form template for this form.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L91 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 91
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L148 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 148
*Signature: public function getHTMLTemplate()
*Signature: public function getHTMLTemplate($type)
*Parameters:
**$type
***Default Value: 'default'
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getListType()===
===getListType()===
Return the list edit type for this list. The possible return values are "list," "dual," or "select." Select will display a drop down of all choices and list and dual will list them all in a table.  Dual includes the linked list object for the object.
Return the list edit type for this list. The possible return values are "list," "dual," or "select." Select will display a drop down of all choices and list and dual will list them all in a table.  Dual includes the linked list object for the object.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L111 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 111
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L176 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 176
*Signature: public function getListType()
*Signature: public function getListType()
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getSortFields()===
===getSortFields()===
Returns a list of fields used for sorting this list.
Returns a list of fields used for sorting this list.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L514 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 514
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L303 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 303
*Signature: static public function getSortFields($form_name)
*Signature: static public function getSortFields($form_name,$style)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name
** [http://www.php.net/manual/en/language.types.string.php string ] $style <br/>Defaults to 'default'
***Default Value: 'default'
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===getViewTemplate()===
===getViewTemplate()===
Return the HTML file name for the view template for this form.
Return the HTML file name for the view template for this form.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L99 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 99
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L160 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 160
*Signature: public function getViewTemplate()
*Signature: public function getViewTemplate($type)
*Parameters:
**$type
***Default Value: 'default'
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===isCached()===
===isCached()===
Checks to see if the id  number is cached. Checks the cache  to see if code  has been cached or not. @param integer $code The code of the entry to lookup.
Checks to see if the id  number is cached. Checks the cache  to see if code  has been cached or not. @param integer $code The code of the entry to lookup.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L556 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 556
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L504 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 504
*Signature: static final protected function isCached($table_name,$id)
*Signature: static final protected function isCached($table_name,$id)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $table_name <br/>The name of the table in the database.
** [http://www.php.net/manual/en/language.types.string.php string ] $table_name <br/>The name of the table in the database.
**$id  
**$id  
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===isList()===
Check to see if a class or class name is a list
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L45 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 45
*Signature: static public function isList($class)
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $class <br/>an object or a string
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===listOptions()===
===listOptions()===
Return the list of options for this list as an array.
Return the list of options for this list as an array. @param string $opt_field An optional field to further limit the list of choices @param integer $opt_value If the $opt_field is used then this is the value to limit it by. @param array $sub_fields of string.  If $op_value is is set, it is an array of  linked ($form+)$field's to include results under the optional value.  e.g. if $opt_value was 'country|10' and $sub_fields was array(county+district,district+region,[region],country) we would display all counties and district who are under country|10.  In this case we display the extended version of the option
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L159 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 159
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L345 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 345
*Signature: static public function listOptions($form_name,$opt_field,$opt_value,$sub_fields,$selectable_forms,$show_hidden)
*Signature: static public function listOptions($form_name,$show_hidden,$select_fields)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name <br/>The form being listed.  This needs to be a subclass of I2CE_List
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name <br/>The form being listed.  This needs to be a subclass of I2CE_List
** [http://www.php.net/manual/en/language.types.string.php string ] $opt_field <br/>An optional field to further limit the list of choices
** [http://www.php.net/manual/en/language.types.integer.php int ] $show_hidden <br/>0=non-hidden, 1=All, 2=hidden only.  Defaults to 0 @param $select_fields An array of field objects of the form type that that are in this form that we want to limit values by.  Defaults to empty array
***Default Value: ""
***Default Value: 0
** integer $opt_value <br/>If the $opt_field is used then this is the value to limit it by.
**$select_fields
***Default Value: '|'
** [http://www.php.net/manual/en/language.types.array.php array ] $sub_fields <br/>of string.  If $op_value is is set, it is an array of linked ($form+)$field's to include results under the optional value.  e.g. if $opt_value was 'country|10' and $sub_fields was array(county+district,district+region,[region],country) we would display all counties and district who are under country|10.  In this case we display the extended version of the option
***Default Value: array()
**$selectable_forms
***Default Value: array()
***Default Value: array()
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $show_hidden <br/>Show the hidden members of the list, defaults to false.
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===lookup()===
===lookup()===
Looks up the description of the item based on the code. This is the default method that most implementations of lookup () use.  It finds the description of the object based on the code and saves it in the cache  and returns it.
Looks up the description of the item based on the code. This is the default method that most implementations of lookup () use.  It finds the description of the object based on the code and saves it in the cache  and returns it.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L533 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 533
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L476 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 476
*Signature: static public function lookup($id,$form_name)
*Signature: static public function lookup($id,$form_name)
*Parameters:
*Parameters:
Line 211: Line 277:
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name <br/>The name of the form in the database.
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name <br/>The name of the form in the database.
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===monsterMash()===
Gets the id's for a form that live at @param string $use_display value.  Defaults to true in which case the displayed fields are returned based on the display value.  If false, then the displa @ returns array.  .  Array with keys the ids of $form_name. For values, if $use_dislpay_value is true, then
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L293 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 293
*Signature: static public function monsterMash($form_name,$opt_field,$opt_formid,$sub_fields,$display_fields,$use_display_value,$show_hidden)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form_name <br/>Example person
** stirng $opt_field <br/>The field we are limiting $form_name on.  Example 'residence'
** stirng $opt_formid <br/>The form|id and we wish to look that $opt_field takes values in
** artary $sub_fields <br/>Example  array(county+district,district+region,[region]) If a non-empty array it are the sub-fields path we wish to add to the results. In the example, if $opt_form|$opt_id = country|10 and $link_field = country, then we add in person where residence = country|10, then those person where residence is an region where  region+country = country|10. Then we add in those person id's where residence is any distrinct whose region is a region with region+country = country|10. Then we add in those person id's where residence is an county whose district has rgion field a region whose country field is country|10.
** [http://www.php.net/manual/en/language.types.array.php array ] $display_fields <br/>The fields which we return the values of.  Defaults to an empty array in which case the value of $options is the display fields registered for this form .
***Default Value: array()
**$use_display_value
***Default Value: true
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $show_hidden <br/>Show the hidden members of the list, defaults to false.
***Default Value: false
===name()===
===name()===
Return the display name for this list object. This will return the same value as lookup() but from the current object instead of from the database.
Return the display name for this list object. This will return the same value as lookup() but from the current object instead of from the database.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L130 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 130
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L197 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 197
*Signature: public function name($delim)
*Signature: public function name($style)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $delim <br/>the delimiter between fields.
** [http://www.php.net/manual/en/language.types.string.php string ] $style <br/>Defaults to 'default'
***Default Value: ' - '  
***Default Value: 'default'  
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===setDisplayData()===
===setDisplayData()===
Sets the field values to be displayed in the HTML template.
Sets the field values to be displayed in the HTML template.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L117 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 117
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L182 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 182
*Signature: public function setDisplayData($template)
*Signature: public function setDisplayData($template)
*Parameters:
*Parameters:
** [[Class: I2CE_Template (Development) | I2CE_Template]] &$template
** [[Class: I2CE_Template (Development) | I2CE_Template]] &$template
===showHiddenLimit()===
===showHiddenLimit()===
Modifies a where clause to limit to hidden fields as neccesary @param boolean $show_hideden
Modifies a where clause to limit to hidden fields as neccesary @param int $show_hideden.  0=non-hidden, 1=All, 2=hidden only
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L244 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 244
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L395 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 395
*Signature: static protected function showHiddenLimit($where,$show_hidden)
*Signature: static public function showHiddenLimit($where,$show_hidden)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $where
** [http://www.php.net/manual/en/language.types.array.php array ] $where
Line 250: Line 301:
===walkupFieldPath()===
===walkupFieldPath()===
Walk up a form/linked  field path until. Return the id of the top form. $param mixed. Either an array of string or a colon-sepearted string.  (imploded) values is a string of the form: form1(+field1):...:formM(+fieldM):..:fieldN there needs to be at least one colon/array needs to be at least two in length
Walk up a form/linked  field path until. Return the id of the top form. $param mixed. Either an array of string or a colon-sepearted string.  (imploded) values is a string of the form: form1(+field1):...:formM(+fieldM):..:fieldN there needs to be at least one colon/array needs to be at least two in length
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L433 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 433
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L408 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 408
*Signature: static public function walkupFieldPath($field_path,$formid)
*Signature: static public function walkupFieldPath($field_path,$formid)
*Parameters:
*Parameters:
Line 259: Line 310:
===__construct()===
===__construct()===
This public method is inherited from [[Class: I2CE_Form (Development)#__construct() | I2CE_Form->__construct()]]
This public method is inherited from [[Class: I2CE_Form (Development)#__construct() | I2CE_Form->__construct()]]
===__get()===
This public method is inherited from [[Class: I2CE_Form (Development)#__get() | I2CE_Form->__get()]]
===__isset()===
This public method is inherited from [[Class: I2CE_Form (Development)#__isset() | I2CE_Form->__isset()]]
===__set()===
This public method is inherited from [[Class: I2CE_Form (Development)#__set() | I2CE_Form->__set()]]
===__unset()===
This public method is inherited from [[Class: I2CE_Form (Development)#__unset() | I2CE_Form->__unset()]]


===addChildForm()===
===addChildForm()===
This public method is inherited from [[Class: I2CE_Form (Development)#addChildForm() | I2CE_Form->addChildForm()]]
This public method is inherited from [[Class: I2CE_Form (Development)#addChildForm() | I2CE_Form->addChildForm()]]


===addField()===
===childFormAdded()===
This public method is inherited from [[Class: I2CE_Form (Development)#addField() | I2CE_Form->addField()]]
This public method is inherited from [[Class: I2CE_Form (Development)#childFormAdded() | I2CE_Form->childFormAdded()]]


===cleanup()===
===cleanup()===
This public method is inherited from [[Class: I2CE_Form (Development)#cleanup() | I2CE_Form->cleanup()]]
This public method is inherited from [[Class: I2CE_Form (Development)#cleanup() | I2CE_Form->cleanup()]]
===clearFields()===
This public method is inherited from [[Class: I2CE_Form (Development)#clearFields() | I2CE_Form->clearFields()]]
===current()===
This public method is inherited from [[Class: I2CE_Form (Development)#current() | I2CE_Form->current()]]


===displayField()===
===displayField()===
Line 295: Line 328:
===getAllowedParentForms()===
===getAllowedParentForms()===
This public method is inherited from [[Class: I2CE_Form (Development)#getAllowedParentForms() | I2CE_Form->getAllowedParentForms()]]
This public method is inherited from [[Class: I2CE_Form (Development)#getAllowedParentForms() | I2CE_Form->getAllowedParentForms()]]
===getAttribute()===
This public method is inherited from [[Class: I2CE_Form (Development)#getAttribute() | I2CE_Form->getAttribute()]]


===getChildForms()===
===getChildForms()===
Line 314: Line 344:
This public method is inherited from [[Class: I2CE_Form (Development)#getField() | I2CE_Form->getField()]]
This public method is inherited from [[Class: I2CE_Form (Development)#getField() | I2CE_Form->getField()]]


===getFieldNames()===
===getFormID()===
This public method is inherited from [[Class: I2CE_Form (Development)#getFieldNames() | I2CE_Form->getFieldNames()]]
This public method is inherited from [[Class: I2CE_Form (Development)#getFormID() | I2CE_Form->getFormID()]]


===getFormId()===
===getHistory()===
This public method is inherited from [[Class: I2CE_Form (Development)#getFormId() | I2CE_Form->getFormId()]]
This public method is inherited from [[Class: I2CE_Form (Development)#getHistory() | I2CE_Form->getHistory()]]
 
===getHTMLName()===
This public method is inherited from [[Class: I2CE_Form (Development)#getHTMLName() | I2CE_Form->getHTMLName()]]
 
===getId()===
This public method is inherited from [[Class: I2CE_Form (Development)#getId() | I2CE_Form->getId()]]


===getParent()===
===getParent()===
Line 335: Line 359:
This public method is inherited from [[Class: I2CE_Form (Development)#getParentID() | I2CE_Form->getParentID()]]
This public method is inherited from [[Class: I2CE_Form (Development)#getParentID() | I2CE_Form->getParentID()]]


===getQueryDisplay()===
===getPost()===
This public method is inherited from [[Class: I2CE_Form (Development)#getQueryDisplay() | I2CE_Form->getQueryDisplay()]]
This public method is inherited from [[Class: I2CE_Form (Development)#getPost() | I2CE_Form->getPost()]]
 
===getQueryFields()===
This public method is inherited from [[Class: I2CE_Form (Development)#getQueryFields() | I2CE_Form->getQueryFields()]]
 
===getQueryString()===
This public method is inherited from [[Class: I2CE_Form (Development)#getQueryString() | I2CE_Form->getQueryString()]]
 
===hasAttribute()===
This public method is inherited from [[Class: I2CE_Form (Development)#hasAttribute() | I2CE_Form->hasAttribute()]]
 
===hasInvalid()===
This public method is inherited from [[Class: I2CE_Form (Development)#hasInvalid() | I2CE_Form->hasInvalid()]]
 
===key()===
This public method is inherited from [[Class: I2CE_Form (Development)#key() | I2CE_Form->key()]]


===listFields()===
===listFields()===
This public method is inherited from [[Class: I2CE_Form (Development)#listFields() | I2CE_Form->listFields()]]
This public method is inherited from [[Class: I2CE_Form (Development)#listFields() | I2CE_Form->listFields()]]


===load()===
===parentIsSet()===
This public method is inherited from [[Class: I2CE_Form (Development)#load() | I2CE_Form->load()]]
This public method is inherited from [[Class: I2CE_Form (Development)#parentIsSet() | I2CE_Form->parentIsSet()]]
 
===next()===
This public method is inherited from [[Class: I2CE_Form (Development)#next() | I2CE_Form->next()]]


===processDOM()===
===processDOM()===
This public method is inherited from [[Class: I2CE_Form (Development)#processDOM() | I2CE_Form->processDOM()]]
This public method is inherited from [[Class: I2CE_Form (Development)#processDOM() | I2CE_Form->processDOM()]]
===removeField()===
This public method is inherited from [[Class: I2CE_Form (Development)#removeField() | I2CE_Form->removeField()]]


===reset()===
===reset()===
This public method is inherited from [[Class: I2CE_Form (Development)#reset() | I2CE_Form->reset()]]
This public method is inherited from [[Class: I2CE_Form (Development)#reset() | I2CE_Form->reset()]]
===rewind()===
This public method is inherited from [[Class: I2CE_Form (Development)#rewind() | I2CE_Form->rewind()]]


===search()===
===search()===
This public method is inherited from [[Class: I2CE_Form (Development)#search() | I2CE_Form->search()]]
This public method is inherited from [[Class: I2CE_Form (Development)#search() | I2CE_Form->search()]]


===setAttribute()===
===setCreated()===
This public method is inherited from [[Class: I2CE_Form (Development)#setAttribute() | I2CE_Form->setAttribute()]]
This public method is inherited from [[Class: I2CE_Form (Development)#setCreated() | I2CE_Form->setCreated()]]


===setDisplayName()===
===setDisplayName()===
Line 389: Line 389:
This public method is inherited from [[Class: I2CE_Form (Development)#setFromPost() | I2CE_Form->setFromPost()]]
This public method is inherited from [[Class: I2CE_Form (Development)#setFromPost() | I2CE_Form->setFromPost()]]


===setId()===
===setLastModified()===
This public method is inherited from [[Class: I2CE_Form (Development)#setId() | I2CE_Form->setId()]]
This public method is inherited from [[Class: I2CE_Form (Development)#setLastModified() | I2CE_Form->setLastModified()]]


===setParent()===
===setParent()===
This public method is inherited from [[Class: I2CE_Form (Development)#setParent() | I2CE_Form->setParent()]]
This public method is inherited from [[Class: I2CE_Form (Development)#setParent() | I2CE_Form->setParent()]]
===isValidFieldName()===
This protected method is inherited from [[Class: I2CE_Form (Development)#isValidFieldName() | I2CE_Form->isValidFieldName()]]
===lookupArray()===
This protected method is inherited from [[Class: I2CE_Form (Development)#lookupArray() | I2CE_Form->lookupArray()]]
===preProcessFieldArgs()===
This protected method is inherited from [[Class: I2CE_Form (Development)#preProcessFieldArgs() | I2CE_Form->preProcessFieldArgs()]]
===setupCreatedField()===
This protected method is inherited from [[Class: I2CE_Form (Development)#setupCreatedField() | I2CE_Form->setupCreatedField()]]
===setupLastModifiedField()===
This protected method is inherited from [[Class: I2CE_Form (Development)#setupLastModifiedField() | I2CE_Form->setupLastModifiedField()]]
===setupParentField()===
This protected method is inherited from [[Class: I2CE_Form (Development)#setupParentField() | I2CE_Form->setupParentField()]]
===__get()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#__get() | I2CE_FieldContainer->__get()]]
===__isset()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#__isset() | I2CE_FieldContainer->__isset()]]
===__set()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#__set() | I2CE_FieldContainer->__set()]]
===__unset()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#__unset() | I2CE_FieldContainer->__unset()]]
===addField()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#addField() | I2CE_FieldContainer->addField()]]
===clearFields()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#clearFields() | I2CE_FieldContainer->clearFields()]]
===current()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#current() | I2CE_FieldContainer->current()]]
===getAttribute()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getAttribute() | I2CE_FieldContainer->getAttribute()]]
===getContainerIndex()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getContainerIndex() | I2CE_FieldContainer->getContainerIndex()]]
===getContainerType()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getContainerType() | I2CE_FieldContainer->getContainerType()]]
===getFieldNames()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getFieldNames() | I2CE_FieldContainer->getFieldNames()]]
===getHTMLName()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getHTMLName() | I2CE_FieldContainer->getHTMLName()]]
===getId()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getId() | I2CE_FieldContainer->getId()]]
===getLoad()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getLoad() | I2CE_FieldContainer->getLoad()]]
===getMeta()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getMeta() | I2CE_FieldContainer->getMeta()]]
===getName()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getName() | I2CE_FieldContainer->getName()]]
===getNameId()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getNameId() | I2CE_FieldContainer->getNameId()]]
===getQueryDisplay()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getQueryDisplay() | I2CE_FieldContainer->getQueryDisplay()]]
===getQueryFields()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getQueryFields() | I2CE_FieldContainer->getQueryFields()]]
===getQueryString()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getQueryString() | I2CE_FieldContainer->getQueryString()]]
===hasAttribute()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#hasAttribute() | I2CE_FieldContainer->hasAttribute()]]
===hasField()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#hasField() | I2CE_FieldContainer->hasField()]]
===hasInvalid()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#hasInvalid() | I2CE_FieldContainer->hasInvalid()]]
===hasMeta()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#hasMeta() | I2CE_FieldContainer->hasMeta()]]
===isValid()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#isValid() | I2CE_FieldContainer->isValid()]]
===key()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#key() | I2CE_FieldContainer->key()]]
===load()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#load() | I2CE_FieldContainer->load()]]
===next()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#next() | I2CE_FieldContainer->next()]]
===removeField()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#removeField() | I2CE_FieldContainer->removeField()]]
===rewind()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#rewind() | I2CE_FieldContainer->rewind()]]
===setAttribute()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#setAttribute() | I2CE_FieldContainer->setAttribute()]]
===setId()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#setId() | I2CE_FieldContainer->setId()]]
===setInvalidMessage()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#setInvalidMessage() | I2CE_FieldContainer->setInvalidMessage()]]
===setMeta()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#setMeta() | I2CE_FieldContainer->setMeta()]]
===setName()===
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#setName() | I2CE_FieldContainer->setName()]]


===valid()===
===valid()===
This public method is inherited from [[Class: I2CE_Form (Development)#valid() | I2CE_Form->valid()]]
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#valid() | I2CE_FieldContainer->valid()]]


===validate()===
===validate()===
This public method is inherited from [[Class: I2CE_Form (Development)#validate() | I2CE_Form->validate()]]
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#validate() | I2CE_FieldContainer->validate()]]


===addFormFields()===
===addFields()===
This protected method is inherited from [[Class: I2CE_Form (Development)#addFormFields() | I2CE_Form->addFormFields()]]
This protected method is inherited from [[Class: I2CE_FieldContainer (Development)#addFields() | I2CE_FieldContainer->addFields()]]


===getFormFieldsData()===
===getAttributes()===
This protected method is inherited from [[Class: I2CE_Form (Development)#getFormFieldsData() | I2CE_Form->getFormFieldsData()]]
This protected method is inherited from [[Class: I2CE_FieldContainer (Development)#getAttributes() | I2CE_FieldContainer->getAttributes()]]
 
===lookupArray()===
This protected method is inherited from [[Class: I2CE_Form (Development)#lookupArray() | I2CE_Form->lookupArray()]]


===_hasMethod()===
===_hasMethod()===
Line 415: Line 535:
===$children===
===$children===
Theis public variable is inherited from [[Class: I2CE_Form (Development)#$children | I2CE_Form->$children]]
Theis public variable is inherited from [[Class: I2CE_Form (Development)#$children | I2CE_Form->$children]]
===$parent_forms===
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$parent_forms | I2CE_Form->$parent_forms]]
===$parentField===
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$parentField | I2CE_Form->$parentField]]
===$lastModifiedField===
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$lastModifiedField | I2CE_Form->$lastModifiedField]]
===$createdField===
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$createdField | I2CE_Form->$createdField]]
===$name===
Theis protected variable is inherited from [[Class: I2CE_FieldContainer (Development)#$name | I2CE_FieldContainer->$name]]
===$display_name===
Theis protected variable is inherited from [[Class: I2CE_FieldContainer (Development)#$display_name | I2CE_FieldContainer->$display_name]]


===$fields===
===$fields===
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$fields | I2CE_Form->$fields]]
Theis protected variable is inherited from [[Class: I2CE_FieldContainer (Development)#$fields | I2CE_FieldContainer->$fields]]


===$parent===
===$attributes===
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$parent | I2CE_Form->$parent]]
Theis protected variable is inherited from [[Class: I2CE_FieldContainer (Development)#$attributes | I2CE_FieldContainer->$attributes]]


===$id===
===$id===
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$id | I2CE_Form->$id]]
Theis protected variable is inherited from [[Class: I2CE_FieldContainer (Development)#$id | I2CE_FieldContainer->$id]]


===$attributes===
===$factory===
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$attributes | I2CE_Form->$attributes]]
Theis protected variable is inherited from [[Class: I2CE_FieldContainer (Development)#$factory | I2CE_FieldContainer->$factory]]
 
===$parent_forms===
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$parent_forms | I2CE_Form->$parent_forms]]
==Inherited Fuzzy Methods==
==Inherited Fuzzy Methods==
===isNumeric()===
===isNumeric()===
Line 454: Line 589:
===generateWhereClause()===
===generateWhereClause()===
This method is inherited from [[Class: I2CE_Form (Development)#generateWhereClause() | I2CE_Form->generateWhereClause()]]
This method is inherited from [[Class: I2CE_Form (Development)#generateWhereClause() | I2CE_Form->generateWhereClause()]]
===processLimit()===
This method is inherited from [[Class: I2CE_Form (Development)#processLimit() | I2CE_Form->processLimit()]]
===getDisplayedExistingLimit()===
This method is inherited from [[Class: I2CE_Form (Development)#getDisplayedExistingLimit() | I2CE_Form->getDisplayedExistingLimit()]]


===isComponentized()===
===isComponentized()===
Line 478: Line 607:
===populate()===
===populate()===
This method is inherited from [[Class: I2CE_Form (Development)#populate() | I2CE_Form->populate()]]
This method is inherited from [[Class: I2CE_Form (Development)#populate() | I2CE_Form->populate()]]
===duplicate()===
This method is inherited from [[Class: I2CE_Form (Development)#duplicate() | I2CE_Form->duplicate()]]
===storeHistory()===
This method is inherited from [[Class: I2CE_Form (Development)#storeHistory() | I2CE_Form->storeHistory()]]


===populateChild()===
===populateChild()===
Line 502: Line 637:
===setChangeType()===
===setChangeType()===
This method is inherited from [[Class: I2CE_Form (Development)#setChangeType() | I2CE_Form->setChangeType()]]
This method is inherited from [[Class: I2CE_Form (Development)#setChangeType() | I2CE_Form->setChangeType()]]
===changeID()===
This method is inherited from [[Class: I2CE_Form (Development)#changeID() | I2CE_Form->changeID()]]


===userMessage()===
===userMessage()===

Latest revision as of 08:15, 6 May 2015


This article describes the abstract class I2CE_List .

Base object for dealing with lists of data. This is an abstract object with base code for many of the I2CE_Form interface methods. It is used for many of the list database objects such as AcademicLevel and District . It assumes all lists have a code field and by default a description field but this can be overwritten by certain objects like Cadre . @abstract

Form Fields

This class is a form class and provides the following form fields

remap

The form field remap is implemented by REMAP

i2ce_hidden

The form field i2ce_hidden is implemented by YESNO

Variables

$mapped_fields_by_form

of array index by names of lists of arrays where keys are form names, values are arrays with keys field names and values field objects

$cache

An array to cache lookup entries Any lookups done to the database will be cached in this static array so additional lookups using the same id won't have to access the database. @static

Methods

_findLowerMatches()

Internal method to find all the ids for forms that are below the given matched form id. This will go through the list of fields until the form that is being matched is found. @param string $match The form id to match at the top.

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 578
  • Signature: static protected function _findLowerMatches($match_form,$match_ids,$fields,$forms,$displayed,$show_hidden)
  • Parameters:
    • $match_form
    • $match_ids
    • array $fields
      The getDisplayedFields() for the field object.
    • array $forms
      The getSelectableForms() for the field object.
    • array $displayed
      A list of forms that should be included in the results.
    • int $show_hidden
      0=non-hidden, 1=All, 2=hidden only. Defaults to 0
      • Default Value: 0
  • Returns: array

_getDisplayFields()

Worker function to get the display fields

_getDisplayString()

worker method to get the display string

_getSortFields()

Worker function to get the display fields

_searchLowerMatches()

Internal method to search all the ids for forms that are below the given matched form id. @param string $match The form id to match at the top.

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 605
  • Signature: static protected function _searchLowerMatches($match_form,$match_ids,$fields,$forms,$displayed,$show_hidden)
  • Parameters:
    • $match_form
    • $match_ids
    • array $fields
      The getDisplayedFields() for the field object.
    • array $forms
      The getSelectableFroms() for the field object.
    • array $displayed
      A list of forms that should be included in the results.
    • int $show_hidden
      0=non-hidden, 1=All, 2=hidden only.
  • Returns: array

addCache()

Adds the id number to the cache . @param integer $code The code of the entry to add.

buildDataTree()

Create a data tree of the selectable forms. Deisgned to be fed into tree select

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 557
  • Signature: static public function buildDataTree($fields,$forms,$limits,$orders,$show_hidden)
  • Parameters:
    • array $fields
      an ordered array E.g array('village+county','county','district,'region+country','country'). it is an "bottom up" array of string where strings are of the form "$form" or "$form+$link_field". In the case of the former type, then $link_field is assumed to be the next form. So for example, "county" has link field "district". If a "$form(+$link_field)" is surrounded by brackets [ ] , it is not displayed.
    • array $forms
      An unorderd array of form names whose values we allow to be selected
    • array $limits
      An array with keys form names and value limit data
    • array $orders
      An array with keys form names and values array of field orders for that form. If the form name has no orders, we use default ordering for that form based on its displayed firelds
      • Default Value: array()
    • int $show_hidden
      0=non-hidden, 1=All, 2=hidden only. Defaults to 0
      • Default Value: 0
  • Returns: array

componentizeQuery()

returns the posible componentization of a form|id

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 129
  • Signature: static public function componentizeQuery($qry,$forms,$component)
  • Parameters:
    • string $qry
      the query need to get the form|id
    • array $forms
      an array of string which are componentized @parm string $component The component we possibly wish to componentize at.
    • $component
  • Returns: string.
    They query need to turn $qry into one componentized to $component.

findLowerMatches()

For the list of displayed fields for a field, find all the ids for forms that are below the given matched form id. For example if a location has the displayed fields of: array( 'county', 'district', '[region]', 'country' ) with selectable fields: array( 'county', 'district' ) if you want to match the district: district|10 this method will return all the county ids that are in district|10. This will also return 'district|10' in the list to have a complete list of valid selectable forms.

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 655
  • Signature: static public function findLowerMatches($match,$fields,$forms,$show_hidden)
  • Parameters:
    • string $match
      The form id to match at the top.
    • array $fields
      The getDisplayedFields() for the field object.
    • array $forms
      The getSelectableFroms() for the field object.
    • int $show_hidden
      0=non-hidden, 1=All, 2=hidden only. Defaults to 0
      • Default Value: 0
  • Returns: array

flattenDataTree()

getCache()

Return the cache cached entry for the id number. @param integer $code The code of the entry to lookup.

getDisplayFieldStyles()

Returns a list of fields used for displaying this list.

getDisplayFields()

Returns a list of fields used for displaying this list.

getDisplayString()

Returns display string used for displaying this list.

getFieldsMappingToList()

Get all fields mapping to the given list type

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 65
  • Signature: static public function getFieldsMappingToList($list)
  • Parameters:
    • mixed $list
      Either a string a list name or isntance of {I2CE_List}
  • Returns: array
    keys are form names, values are arrays with keys field names and values field objects

getHTMLTemplate()

Return the HTML file name for the form template for this form.

getListType()

Return the list edit type for this list. The possible return values are "list," "dual," or "select." Select will display a drop down of all choices and list and dual will list them all in a table. Dual includes the linked list object for the object.

getSortFields()

Returns a list of fields used for sorting this list.

getViewTemplate()

Return the HTML file name for the view template for this form.

isCached()

Checks to see if the id number is cached. Checks the cache to see if code has been cached or not. @param integer $code The code of the entry to lookup.

isList()

Check to see if a class or class name is a list

listOptions()

Return the list of options for this list as an array. @param string $opt_field An optional field to further limit the list of choices @param integer $opt_value If the $opt_field is used then this is the value to limit it by. @param array $sub_fields of string. If $op_value is is set, it is an array of linked ($form+)$field's to include results under the optional value. e.g. if $opt_value was 'country|10' and $sub_fields was array(county+district,district+region,[region],country) we would display all counties and district who are under country|10. In this case we display the extended version of the option

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 345
  • Signature: static public function listOptions($form_name,$show_hidden,$select_fields)
  • Parameters:
    • string $form_name
      The form being listed. This needs to be a subclass of I2CE_List
    • int $show_hidden
      0=non-hidden, 1=All, 2=hidden only. Defaults to 0 @param $select_fields An array of field objects of the form type that that are in this form that we want to limit values by. Defaults to empty array
      • Default Value: 0
    • $select_fields
      • Default Value: array()
  • Returns: array

lookup()

Looks up the description of the item based on the code. This is the default method that most implementations of lookup () use. It finds the description of the object based on the code and saves it in the cache and returns it.

name()

Return the display name for this list object. This will return the same value as lookup() but from the current object instead of from the database.

setDisplayData()

Sets the field values to be displayed in the HTML template.

showHiddenLimit()

Modifies a where clause to limit to hidden fields as neccesary @param int $show_hideden. 0=non-hidden, 1=All, 2=hidden only

walkupFieldPath()

Walk up a form/linked field path until. Return the id of the top form. $param mixed. Either an array of string or a colon-sepearted string. (imploded) values is a string of the form: form1(+field1):...:formM(+fieldM):..:fieldN there needs to be at least one colon/array needs to be at least two in length

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 408
  • Signature: static public function walkupFieldPath($field_path,$formid)
  • Parameters:
    • $field_path
    • string $formid
      string of the form "$form|$id". the starting value. $form should be one of formX above (e.g. the dbvalue of a map field)
  • Returns: mixed.
    False on failure, string of the form "$form|$id" on success

Inherited Methods

__construct()

This public method is inherited from I2CE_Form->__construct()

addChildForm()

This public method is inherited from I2CE_Form->addChildForm()

childFormAdded()

This public method is inherited from I2CE_Form->childFormAdded()

cleanup()

This public method is inherited from I2CE_Form->cleanup()

displayField()

This public method is inherited from I2CE_Form->displayField()

form()

This public method is inherited from I2CE_Form->form()

getAllowedParentForms()

This public method is inherited from I2CE_Form->getAllowedParentForms()

getChildForms()

This public method is inherited from I2CE_Form->getChildForms()

getChildFormsByForm()

This public method is inherited from I2CE_Form->getChildFormsByForm()

getChildren()

This public method is inherited from I2CE_Form->getChildren()

getDisplayName()

This public method is inherited from I2CE_Form->getDisplayName()

getField()

This public method is inherited from I2CE_Form->getField()

getFormID()

This public method is inherited from I2CE_Form->getFormID()

getHistory()

This public method is inherited from I2CE_Form->getHistory()

getParent()

This public method is inherited from I2CE_Form->getParent()

getParentForm()

This public method is inherited from I2CE_Form->getParentForm()

getParentID()

This public method is inherited from I2CE_Form->getParentID()

getPost()

This public method is inherited from I2CE_Form->getPost()

listFields()

This public method is inherited from I2CE_Form->listFields()

parentIsSet()

This public method is inherited from I2CE_Form->parentIsSet()

processDOM()

This public method is inherited from I2CE_Form->processDOM()

reset()

This public method is inherited from I2CE_Form->reset()

search()

This public method is inherited from I2CE_Form->search()

setCreated()

This public method is inherited from I2CE_Form->setCreated()

setDisplayName()

This public method is inherited from I2CE_Form->setDisplayName()

setForm()

This public method is inherited from I2CE_Form->setForm()

setFromPost()

This public method is inherited from I2CE_Form->setFromPost()

setLastModified()

This public method is inherited from I2CE_Form->setLastModified()

setParent()

This public method is inherited from I2CE_Form->setParent()

isValidFieldName()

This protected method is inherited from I2CE_Form->isValidFieldName()

lookupArray()

This protected method is inherited from I2CE_Form->lookupArray()

preProcessFieldArgs()

This protected method is inherited from I2CE_Form->preProcessFieldArgs()

setupCreatedField()

This protected method is inherited from I2CE_Form->setupCreatedField()

setupLastModifiedField()

This protected method is inherited from I2CE_Form->setupLastModifiedField()

setupParentField()

This protected method is inherited from I2CE_Form->setupParentField()

__get()

This public method is inherited from I2CE_FieldContainer->__get()

__isset()

This public method is inherited from I2CE_FieldContainer->__isset()

__set()

This public method is inherited from I2CE_FieldContainer->__set()

__unset()

This public method is inherited from I2CE_FieldContainer->__unset()

addField()

This public method is inherited from I2CE_FieldContainer->addField()

clearFields()

This public method is inherited from I2CE_FieldContainer->clearFields()

current()

This public method is inherited from I2CE_FieldContainer->current()

getAttribute()

This public method is inherited from I2CE_FieldContainer->getAttribute()

getContainerIndex()

This public method is inherited from I2CE_FieldContainer->getContainerIndex()

getContainerType()

This public method is inherited from I2CE_FieldContainer->getContainerType()

getFieldNames()

This public method is inherited from I2CE_FieldContainer->getFieldNames()

getHTMLName()

This public method is inherited from I2CE_FieldContainer->getHTMLName()

getId()

This public method is inherited from I2CE_FieldContainer->getId()

getLoad()

This public method is inherited from I2CE_FieldContainer->getLoad()

getMeta()

This public method is inherited from I2CE_FieldContainer->getMeta()

getName()

This public method is inherited from I2CE_FieldContainer->getName()

getNameId()

This public method is inherited from I2CE_FieldContainer->getNameId()

getQueryDisplay()

This public method is inherited from I2CE_FieldContainer->getQueryDisplay()

getQueryFields()

This public method is inherited from I2CE_FieldContainer->getQueryFields()

getQueryString()

This public method is inherited from I2CE_FieldContainer->getQueryString()

hasAttribute()

This public method is inherited from I2CE_FieldContainer->hasAttribute()

hasField()

This public method is inherited from I2CE_FieldContainer->hasField()

hasInvalid()

This public method is inherited from I2CE_FieldContainer->hasInvalid()

hasMeta()

This public method is inherited from I2CE_FieldContainer->hasMeta()

isValid()

This public method is inherited from I2CE_FieldContainer->isValid()

key()

This public method is inherited from I2CE_FieldContainer->key()

load()

This public method is inherited from I2CE_FieldContainer->load()

next()

This public method is inherited from I2CE_FieldContainer->next()

removeField()

This public method is inherited from I2CE_FieldContainer->removeField()

rewind()

This public method is inherited from I2CE_FieldContainer->rewind()

setAttribute()

This public method is inherited from I2CE_FieldContainer->setAttribute()

setId()

This public method is inherited from I2CE_FieldContainer->setId()

setInvalidMessage()

This public method is inherited from I2CE_FieldContainer->setInvalidMessage()

setMeta()

This public method is inherited from I2CE_FieldContainer->setMeta()

setName()

This public method is inherited from I2CE_FieldContainer->setName()

valid()

This public method is inherited from I2CE_FieldContainer->valid()

validate()

This public method is inherited from I2CE_FieldContainer->validate()

addFields()

This protected method is inherited from I2CE_FieldContainer->addFields()

getAttributes()

This protected method is inherited from I2CE_FieldContainer->getAttributes()

_hasMethod()

This public method is inherited from I2CE_Fuzzy->_hasMethod()

Inherited Variables

$children

Theis public variable is inherited from I2CE_Form->$children

$parent_forms

Theis protected variable is inherited from I2CE_Form->$parent_forms

$parentField

Theis protected variable is inherited from I2CE_Form->$parentField

$lastModifiedField

Theis protected variable is inherited from I2CE_Form->$lastModifiedField

$createdField

Theis protected variable is inherited from I2CE_Form->$createdField

$name

Theis protected variable is inherited from I2CE_FieldContainer->$name

$display_name

Theis protected variable is inherited from I2CE_FieldContainer->$display_name

$fields

Theis protected variable is inherited from I2CE_FieldContainer->$fields

$attributes

Theis protected variable is inherited from I2CE_FieldContainer->$attributes

$id

Theis protected variable is inherited from I2CE_FieldContainer->$id

$factory

Theis protected variable is inherited from I2CE_FieldContainer->$factory

Inherited Fuzzy Methods

isNumeric()

This method is inherited from I2CE_Form->isNumeric()

getLimitStyles()

This method is inherited from I2CE_Form->getLimitStyles()

checkLimit()

This method is inherited from I2CE_Form->checkLimit()

checkWhereClause()

This method is inherited from I2CE_Form->checkWhereClause()

createCheckFunction()

This method is inherited from I2CE_Form->createCheckFunction()

createCheckLimitString()

This method is inherited from I2CE_Form->createCheckLimitString()

generateLimit()

This method is inherited from I2CE_Form->generateLimit()

generateWhereClause()

This method is inherited from I2CE_Form->generateWhereClause()

isComponentized()

This method is inherited from I2CE_Form->isComponentized()

addChild()

This method is inherited from I2CE_Form->addChild()

getChildIds()

This method is inherited from I2CE_Form->getChildIds()

getStorage()

This method is inherited from I2CE_Form->getStorage()

isWritable()

This method is inherited from I2CE_Form->isWritable()

populate()

This method is inherited from I2CE_Form->populate()

duplicate()

This method is inherited from I2CE_Form->duplicate()

storeHistory()

This method is inherited from I2CE_Form->storeHistory()

populateChild()

This method is inherited from I2CE_Form->populateChild()

populateChildren()

This method is inherited from I2CE_Form->populateChildren()

populateFirst()

This method is inherited from I2CE_Form->populateFirst()

populateHistory()

This method is inherited from I2CE_Form->populateHistory()

populateLast()

This method is inherited from I2CE_Form->populateLast()

delete()

This method is inherited from I2CE_Form->delete()

save()

This method is inherited from I2CE_Form->save()

setChangeType()

This method is inherited from I2CE_Form->setChangeType()

changeID()

This method is inherited from I2CE_Form->changeID()

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()