Class: I2CE List (Development): Difference between revisions

From IHRIS Wiki
(Created page with '{{otherversions|Class: I2CE_List}} This article describes the ''abstract'' class ''I2CE_List'' . *Extends the class: I2CE_Form. *Child Classe…')
 
No edit summary
Line 65: Line 65:
==Methods==
==Methods==
===_flattenDataTree()===
===_flattenDataTree()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L952 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 952
*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
*Signature: static protected function _flattenDataTree($data,$list)
*Signature: static protected function _flattenDataTree($data,$list)
*Parameters:
*Parameters:
Line 72: Line 72:
===_monsterMash()===
===_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 @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
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
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L331 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 331
*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
*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)
*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)
*Parameters:
*Parameters:
Line 92: Line 92:
===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#L561 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 561
*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
*Signature: static final protected function addCache($table_name,$id,$value)
*Signature: static final protected function addCache($table_name,$id,$value)
*Parameters:
*Parameters:
Line 109: Line 109:
===createDataTree()===
===createDataTree()===
Create a data tree of the selectable forms.  Deisgned to be fed into tree select
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.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L759 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 759
*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
*Signature: static public function createDataTree($fields,$forms,$limits,$orders,$display_first,$major_separator,$minor_separator,$show_hidden)
*Signature: static public function createDataTree($fields,$forms,$limits,$orders,$display_first,$major_separator,$minor_separator,$show_hidden)
*Parameters:
*Parameters:
Line 126: Line 126:
***Default Value: 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#L945 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 945
*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
*Signature: static public function flattenDataTree($data)
*Signature: static public function flattenDataTree($data)
*Parameters:
*Parameters:
Line 132: Line 132:
===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#L574 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 574
*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
*Signature: static final protected function getCache($table_name,$id)
*Signature: static final protected function getCache($table_name,$id)
*Parameters:
*Parameters:
Line 140: Line 140:
===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#L486 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 486
*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
*Signature: static public function getDisplayFields($form_name)
*Signature: static public function getDisplayFields($form_name)
*Parameters:
*Parameters:
Line 147: Line 147:
===getExtendedDisplay()===
===getExtendedDisplay()===
get an exended display for a field value
get an exended display for a field value
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L593 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 593
*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
*Signature: static public function getExtendedDisplay($fields,$start_value,$major_separator,$minor_separator)
*Signature: static public function getExtendedDisplay($fields,$start_value,$major_separator,$minor_separator)
*Parameters:
*Parameters:
Line 164: Line 164:
===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#L102 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 102
*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
*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#L505 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 505
*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
*Signature: static public function getSortFields($form_name)
*Signature: static public function getSortFields($form_name)
*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
*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()===
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
*Signature: public function getViewTemplate()
*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#L547 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 547
*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
*Signature: static final protected function isCached($table_name,$id)
*Signature: static final protected function isCached($table_name,$id)
*Parameters:
*Parameters:
Line 184: Line 189:
===listOptions()===
===listOptions()===
Return the list of options for this list as an array.
Return the list of options for this list as an array.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L150 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 150
*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
*Signature: static public function listOptions($form_name,$opt_field,$opt_value,$sub_fields,$selectable_forms,$show_hidden)
*Signature: static public function listOptions($form_name,$opt_field,$opt_value,$sub_fields,$selectable_forms,$show_hidden)
*Parameters:
*Parameters:
Line 200: Line 205:
===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#L524 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 524
*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
*Signature: static public function lookup($id,$form_name)
*Signature: static public function lookup($id,$form_name)
*Parameters:
*Parameters:
Line 208: Line 213:
===monsterMash()===
===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
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#L284 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 284
*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)
*Signature: static public function monsterMash($form_name,$opt_field,$opt_formid,$sub_fields,$display_fields,$use_display_value,$show_hidden)
*Parameters:
*Parameters:
Line 223: Line 228:
===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#L121 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 121
*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
*Signature: public function name($delim)
*Signature: public function name($delim)
*Parameters:
*Parameters:
Line 231: Line 236:
===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#L108 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 108
*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
*Signature: public function setDisplayData($template)
*Signature: public function setDisplayData($template)
*Parameters:
*Parameters:
Line 237: Line 242:
===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 boolean $show_hideden
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_List.php#L235 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 235
*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
*Signature: static protected function showHiddenLimit($where,$show_hidden)
*Signature: static protected function showHiddenLimit($where,$show_hidden)
*Parameters:
*Parameters:
Line 245: Line 250:
===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#L424 i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php] on line 424
*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
*Signature: static public function walkupFieldPath($field_path,$formid)
*Signature: static public function walkupFieldPath($field_path,$formid)
*Parameters:
*Parameters:
Line 254: Line 259:
===__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()===
Line 383: Line 400:
===validate()===
===validate()===
This public method is inherited from [[Class: I2CE_Form (Development)#validate() | I2CE_Form->validate()]]
This public method is inherited from [[Class: I2CE_Form (Development)#validate() | I2CE_Form->validate()]]
===__get()===
This protected method is inherited from [[Class: I2CE_Form (Development)#__get() | I2CE_Form->__get()]]
===__isset()===
This protected method is inherited from [[Class: I2CE_Form (Development)#__isset() | I2CE_Form->__isset()]]
===__set()===
This protected method is inherited from [[Class: I2CE_Form (Development)#__set() | I2CE_Form->__set()]]
===__unset()===
This protected method is inherited from [[Class: I2CE_Form (Development)#__unset() | I2CE_Form->__unset()]]


===addFormFields()===
===addFormFields()===

Revision as of 07:53, 27 May 2010


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

i2ce_hidden

The form field i2ce_hidden is implemented by 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

$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

_flattenDataTree()

_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 @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

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 340
  • 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)
  • Parameters:
    • array &$options
      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
    • string $form_name
    • stirng $opt_field
      The field we are limiting $form_name on.
    • stirng $opt_form
      The form we wish to look that $opt_field takes values in
    • string $opt_id
      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
    • artary $sub_fields
      Example array(county+district,district+region,[region])
    • string $sub_val
      Defaults to . If use_display_value is set, a string we prepend to the displayed fields for the id
      • Default Value:
    • array $display_fields
      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
    • boolean $show_hidden
      Show the hidden members of the list, defaults to false.
      • Default Value: false

addCache()

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

componentizeQuery()

returns the posible componentization of a form|id

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 72
  • 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.

createDataTree()

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 768
  • Signature: static public function createDataTree($fields,$forms,$limits,$orders,$display_first,$major_separator,$minor_separator,$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()
    • $display_first
      • Default Value: true
    • string $major_separator
      The seperator between the start display value and the extended display values. If null, then the title is an array of values
      • Default Value: ' - '
    • string $minor_separator
      The sepeartor between the extended display values
      • Default Value: ' '
    • boolean $show_hidden
      Show the hidden members of the list, defaults to false.
      • Default Value: false

flattenDataTree()

getCache()

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

getDisplayFields()

Returns a list of fields used for displaying this list.

getExtendedDisplay()

get an exended display for a field value

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 602
  • Signature: static public function getExtendedDisplay($fields,$start_value,$major_separator,$minor_separator)
  • 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.
    • string $start_value
      E.g. "village|10"
    • string $major_separator
      The seperator between the start display value and the extended display values. If null, we return an array.
      • Default Value: ' - '
    • string $minor_separator
      The sepeartor between the extended display values
      • Default Value: ' '
  • Returns: string
    or array

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.

listOptions()

Return the list of options for this list as an array.

  • Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_List.php on line 159
  • Signature: static public function listOptions($form_name,$opt_field,$opt_value,$sub_fields,$selectable_forms,$show_hidden)
  • Parameters:
    • string $form_name
      The form being listed. This needs to be a subclass of I2CE_List
    • string $opt_field
      An optional field to further limit the list of choices
      • Default Value: ""
    • integer $opt_value
      If the $opt_field is used then this is the value to limit it by.
      • Default Value: '|'
    • 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
      • Default Value: array()
    • $selectable_forms
      • Default Value: array()
    • boolean $show_hidden
      Show the hidden members of the list, defaults to false.
  • 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.

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 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:
    • string $form_name
      Example person
    • stirng $opt_field
      The field we are limiting $form_name on. Example 'residence'
    • stirng $opt_formid
      The form|id and we wish to look that $opt_field takes values in
    • artary $sub_fields
      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.
    • array $display_fields
      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
    • boolean $show_hidden
      Show the hidden members of the list, defaults to false.
      • Default Value: false

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 boolean $show_hideden

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 433
  • 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()

__get()

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

__isset()

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

__set()

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

__unset()

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

addChildForm()

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

addField()

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

cleanup()

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

clearFields()

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

current()

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

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()

getAttribute()

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

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()

getFieldNames()

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

getFormId()

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

getHTMLName()

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

getId()

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

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()

getQueryDisplay()

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

getQueryFields()

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

getQueryString()

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

hasAttribute()

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

hasInvalid()

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

key()

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

listFields()

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

load()

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

next()

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

processDOM()

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

removeField()

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

reset()

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

rewind()

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

search()

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

setAttribute()

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

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()

setId()

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

setParent()

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

valid()

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

validate()

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

addFormFields()

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

getFormFieldsData()

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

lookupArray()

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

_hasMethod()

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

Inherited Variables

$children

Theis public variable is inherited from I2CE_Form->$children

$fields

Theis protected variable is inherited from I2CE_Form->$fields

$parent

Theis protected variable is inherited from I2CE_Form->$parent

$id

Theis protected variable is inherited from I2CE_Form->$id

$attributes

Theis protected variable is inherited from I2CE_Form->$attributes

$parent_forms

Theis protected variable is inherited from I2CE_Form->$parent_forms

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()

processLimit()

This method is inherited from I2CE_Form->processLimit()

getDisplayedExistingLimit()

This method is inherited from I2CE_Form->getDisplayedExistingLimit()

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()

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()

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()