Class: I2CE FormStorage magicdata: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 6: Line 6:
*Extends the class: [[Class: I2CE_FormStorage_DB | I2CE_FormStorage_DB]].
*Extends the class: [[Class: I2CE_FormStorage_DB | I2CE_FormStorage_DB]].
*Location: Part of the module [[I2CE Module List#forms-storage-magicdata|forms-storage-magicdata]] in the package [https://launchpad.net/i2ce I2CE]
*Location: Part of the module [[I2CE Module List#forms-storage-magicdata|forms-storage-magicdata]] in the package [https://launchpad.net/i2ce I2CE]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.1-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php#L33 modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php] on line 33
*Author: Carl Leitner <litlfred@ibiblio.org>
*Author: Carl Leitner <litlfred@ibiblio.org>
*Since: v4.0.0
*Since: v4.0.0
Line 13: Line 13:
===FF_save()===
===FF_save()===
Save the FormField to the database.
Save the FormField to the database.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php#L315 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php] on line 315
*Signature: public function FF_save($form_field,$do_check,$user)
*Signature: public function FF_save($form_field,$do_check,$user)
*Parameters:
*Parameters:
Line 21: Line 22:
===__construct()===
===__construct()===
Construct this module class
Construct this module class
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php#L42 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php] on line 42
*Signature: public function __construct($name,$options)
*Signature: public function __construct($name,$options)
*Parameters:
*Parameters:
Line 28: Line 30:
===delete()===
===delete()===
Deletes a form from the entry tables. @param boolean $deleted_records: a flag to determine if the record should not go to the deleted_records table. default: false
Deletes a form from the entry tables. @param boolean $deleted_records: a flag to determine if the record should not go to the deleted_records table. default: false
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php#L221 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php] on line 221
*Signature: public function delete($form,$transact,$complete,$no_history)
*Signature: public function delete($form,$transact,$complete,$no_history)
*Parameters:
*Parameters:
Line 37: Line 40:
===getFormConfig()===
===getFormConfig()===
Return the magic data node for the given form.
Return the magic data node for the given form.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php#L176 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php] on line 176
*Signature: protected function getFormConfig($form,$create_id)
*Signature: protected function getFormConfig($form,$create_id)
*Parameters:
*Parameters:
Line 45: Line 49:
===getFormConfigById()===
===getFormConfigById()===
Return the magic data node for the given form name and id
Return the magic data node for the given form name and id
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php#L193 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php] on line 193
*Signature: protected function getFormConfigById($form_name,$id,$create_id)
*Signature: protected function getFormConfigById($form_name,$id,$create_id)
*Parameters:
*Parameters:
Line 53: Line 58:
===getNextAvailableId()===
===getNextAvailableId()===
Gets the next unused integer id for the form.  At least 1
Gets the next unused integer id for the form.  At least 1
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php#L283 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php] on line 283
*Signature: protected function getNextAvailableId($form_name)
*Signature: protected function getNextAvailableId($form_name)
*Parameters:
*Parameters:
Line 59: Line 65:
===getRequiredFieldsQuery()===
===getRequiredFieldsQuery()===
Construct a query (to be used as a sub-select) to view the fields of the given form.  It always will return the id of the form as well @param callback $field_refernece_callback.  A callback function whose first arguement is the form, the second arguements is the field and which returns the way the field value should be references as a field.  If the callback is null (the default) then the reference used is "$form+$field"
Construct a query (to be used as a sub-select) to view the fields of the given form.  It always will return the id of the form as well @param callback $field_refernece_callback.  A callback function whose first arguement is the form, the second arguements is the field and which returns the way the field value should be references as a field.  If the callback is null (the default) then the reference used is "$form+$field"
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php#L65 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php] on line 65
*Signature: public function getRequiredFieldsQuery($form,$fields,$id,$parent,$field_reference_callback,$mod_time)
*Signature: public function getRequiredFieldsQuery($form,$fields,$id,$parent,$field_reference_callback,$mod_time)
*Parameters:
*Parameters:
Line 74: Line 81:
===isWritable()===
===isWritable()===
Checks to see if this is writalbe
Checks to see if this is writalbe
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php#L237 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php] on line 237
*Signature: public function isWritable()
*Signature: public function isWritable()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===save()===
===save()===
Save a form object into magicdata
Save a form object into magicdata
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php#L249 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php] on line 249
*Signature: public function save($form,$user,$transact)
*Signature: public function save($form,$user,$transact)
*Parameters:
*Parameters:
Line 127: Line 136:
*Extends the class: [[Class: I2CE_FormStorage_Mechanism | I2CE_FormStorage_Mechanism]].
*Extends the class: [[Class: I2CE_FormStorage_Mechanism | I2CE_FormStorage_Mechanism]].
*Location: Part of the module [[I2CE Module List#forms-storage-magicdata|forms-storage-magicdata]] in the package [https://launchpad.net/i2ce I2CE]
*Location: Part of the module [[I2CE Module List#forms-storage-magicdata|forms-storage-magicdata]] in the package [https://launchpad.net/i2ce I2CE]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.1-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L38 modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 38
*Author: Carl Leitner <litlfred@ibiblio.org>
*Author: Carl Leitner <litlfred@ibiblio.org>
*Since: 3.2
*Since: 3.2
Line 134: Line 143:
===FF_populateHistory()===
===FF_populateHistory()===
Populate the history of entries for the form field if the storage module handles history.
Populate the history of entries for the form field if the storage module handles history.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L140 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 140
*Signature: public function FF_populateHistory($form_field)
*Signature: public function FF_populateHistory($form_field)
*Parameters:
*Parameters:
Line 140: Line 150:
===FF_save()===
===FF_save()===
Save the FormField to the database.
Save the FormField to the database.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L804 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 804
*Signature: public function FF_save($form_field,$do_check,$user)
*Signature: public function FF_save($form_field,$do_check,$user)
*Parameters:
*Parameters:
Line 148: Line 159:
===__construct()===
===__construct()===
Construct this module class
Construct this module class
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L53 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 53
*Signature: public function __construct($name,$options)
*Signature: public function __construct($name,$options)
*Parameters:
*Parameters:
Line 155: Line 167:
===delete()===
===delete()===
Deletes a form from the entry tables. @param boolean $deleted_records: a flag to determine if the record should not go to the deleted_records table. default: false
Deletes a form from the entry tables. @param boolean $deleted_records: a flag to determine if the record should not go to the deleted_records table. default: false
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L719 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 719
*Signature: public function delete($form,$transact,$complete,$no_history)
*Signature: public function delete($form,$transact,$complete,$no_history)
*Parameters:
*Parameters:
Line 164: Line 177:
===getFormConfig()===
===getFormConfig()===
Return the magic data node for the given form.
Return the magic data node for the given form.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L64 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 64
*Signature: protected function getFormConfig($form,$create_id)
*Signature: protected function getFormConfig($form,$create_id)
*Parameters:
*Parameters:
Line 172: Line 186:
===getFormConfigById()===
===getFormConfigById()===
Return the magic data node for the given form name and id
Return the magic data node for the given form name and id
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L81 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 81
*Signature: protected function getFormConfigById($form_name,$id,$create_id)
*Signature: protected function getFormConfigById($form_name,$id,$create_id)
*Parameters:
*Parameters:
Line 180: Line 195:
===getNextAvailableId()===
===getNextAvailableId()===
Gets the next unused integer id for the form.  At least 1
Gets the next unused integer id for the form.  At least 1
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L772 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 772
*Signature: protected function getNextAvailableId($form_name)
*Signature: protected function getNextAvailableId($form_name)
*Parameters:
*Parameters:
Line 186: Line 202:
===getRecords()===
===getRecords()===
Return an array of all the record ids for a given form.
Return an array of all the record ids for a given form.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L161 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 161
*Signature: public function getRecords($form_name)
*Signature: public function getRecords($form_name)
*Parameters:
*Parameters:
Line 192: Line 209:
===isWritable()===
===isWritable()===
Checks to see if this is writalbe
Checks to see if this is writalbe
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L44 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 44
*Signature: public function isWritable()
*Signature: public function isWritable()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===listDisplayFields()===
===listDisplayFields()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L551 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 551
*Signature: public function listDisplayFields($form,$fields,$parent,$where_data,$ordering,$limit,$mod_time)
*Signature: public function listDisplayFields($form,$fields,$parent,$where_data,$ordering,$limit,$mod_time)
*Parameters:
*Parameters:
Line 211: Line 230:
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>an array with key id's and value and array of values.  the array of values has as keys the fields with their corresponding value.
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>an array with key id's and value and array of values.  the array of values has as keys the fields with their corresponding value.
===listFields()===
===listFields()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L397 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 397
*Signature: public function listFields($form,$fields,$parent,$where_data,$ordering,$limit,$mod_time)
*Signature: public function listFields($form,$fields,$parent,$where_data,$ordering,$limit,$mod_time)
*Parameters:
*Parameters:
Line 228: Line 248:
===lookupDisplayField()===
===lookupDisplayField()===
Looks up the display vlaue 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 display vlaue 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.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L235 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 235
*Signature: public function lookupDisplayField($form,$id,$fields,$delim)
*Signature: public function lookupDisplayField($form,$id,$fields,$delim)
*Parameters:
*Parameters:
Line 237: Line 258:
===lookupField()===
===lookupField()===
Looks up the db value 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 db value 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.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L191 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 191
*Signature: public function lookupField($form,$id,$fields,$delim)
*Signature: public function lookupField($form,$id,$fields,$delim)
*Parameters:
*Parameters:
Line 245: Line 267:
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>false on failure
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>false on failure
===orderByFields()===
===orderByFields()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L700 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 700
*Signature: static public function orderByFields($vals,$ordering)
*Signature: static public function orderByFields($vals,$ordering)
*Parameters:
*Parameters:
Line 251: Line 274:
===populate()===
===populate()===
Populate the member variables of the object from the database.
Populate the member variables of the object from the database.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L104 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 104
*Signature: public function populate($form)
*Signature: public function populate($form)
*Parameters:
*Parameters:
** [[Class: I2CE_Form | I2CE_Form]] $form
** [[Class: I2CE_Form | I2CE_Form]] $form
===quickSearch()===
===quickSearch()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L319 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 319
*Signature: protected function quickSearch($form,$parent,$where_data,$limit)
*Signature: protected function quickSearch($form,$parent,$where_data,$limit)
*Parameters:
*Parameters:
Line 267: Line 292:
===save()===
===save()===
Save a form object into magicdata
Save a form object into magicdata
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L738 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 738
*Signature: public function save($form,$user,$transact)
*Signature: public function save($form,$user,$transact)
*Parameters:
*Parameters:
Line 273: Line 299:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $transact
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $transact
===search()===
===search()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php#L290 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php] on line 290
*Signature: public function search($form,$parent,$where_data,$ordering,$limit)
*Signature: public function search($form,$parent,$where_data,$ordering,$limit)
*Parameters:
*Parameters:

Revision as of 09:50, 10 November 2009

The class I2CE_FormStorage_magicdata contains 2 definitions:

i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php

This article describes the class I2CE_FormStorage_magicdata.

@filesource Class I2CE_FormStorage_magicdata

Methods

FF_save()

Save the FormField to the database.

__construct()

Construct this module class

delete()

Deletes a form from the entry tables. @param boolean $deleted_records: a flag to determine if the record should not go to the deleted_records table. default: false

getFormConfig()

Return the magic data node for the given form.

getFormConfigById()

Return the magic data node for the given form name and id

getNextAvailableId()

Gets the next unused integer id for the form. At least 1

getRequiredFieldsQuery()

Construct a query (to be used as a sub-select) to view the fields of the given form. It always will return the id of the form as well @param callback $field_refernece_callback. A callback function whose first arguement is the form, the second arguements is the field and which returns the way the field value should be references as a field. If the callback is null (the default) then the reference used is "$form+$field"

  • Defined in i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.db.php on line 65
  • Signature: public function getRequiredFieldsQuery($form,$fields,$id,$parent,$field_reference_callback,$mod_time)
  • Parameters:
    • string $form
    • mixed $fields
      Either a string, the field, or an array of string, the fields.
    • mixed $id
      Defaults to null. If non-null it is the id that we wish to limit to.
      • Default Value: null
    • boolean $parent
      Defaults to false. If true, we include the parent id as a referenced field. If it is scalar and non-boolean, it is consider to be the ID of the parent, and then we get all forms with parent the given id.
      • Default Value: false
    • $field_reference_callback
      • Default Value: null
    • integer $mod_time
      Defaults to -1. If non-negative, we only list the requested fields for an id if at least one of them has a modification time greater than or equal to $mod_time. If the form storage has no way of tracking modifucation time, all entries are listed.
      • Default Value: -1
  • Returns: string
    the query or false on failed.

isWritable()

Checks to see if this is writalbe

save()

Save a form object into magicdata

Inherited Methods

getFields()

This public method is inherited from I2CE_FormStorage_DB->getFields()

getIdsAsChild()

This public method is inherited from I2CE_FormStorage_DB->getIdsAsChild()

FF_IG_setSequence()

This public method is inherited from I2CE_FormStorage_Mechanism->FF_IG_setSequence()

getFormsById()

This public method is inherited from I2CE_FormStorage_Mechanism->getFormsById()

populateHistory()

This public method is inherited from I2CE_FormStorage_Mechanism->populateHistory()

compareFormsByFields()

This protected method is inherited from I2CE_FormStorage_Mechanism->compareFormsByFields()

getLimitedFields()

This protected method is inherited from I2CE_FormStorage_Mechanism->getLimitedFields()

_hasMethod()

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

Inherited Variables

$db

Theis protected variable is inherited from I2CE_FormStorage_DB->$db

$name

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$name

$global_options

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$global_options

$ordering

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$ordering

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()

i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php

This article describes the class I2CE_FormStorage_magicdata.

I2CE_Module_FormStorageEntry

Methods

FF_populateHistory()

Populate the history of entries for the form field if the storage module handles history.

FF_save()

Save the FormField to the database.

__construct()

Construct this module class

delete()

Deletes a form from the entry tables. @param boolean $deleted_records: a flag to determine if the record should not go to the deleted_records table. default: false

getFormConfig()

Return the magic data node for the given form.

getFormConfigById()

Return the magic data node for the given form name and id

getNextAvailableId()

Gets the next unused integer id for the form. At least 1

getRecords()

Return an array of all the record ids for a given form.

isWritable()

Checks to see if this is writalbe

listDisplayFields()

  • Defined in i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php on line 551
  • Signature: public function listDisplayFields($form,$fields,$parent,$where_data,$ordering,$limit,$mod_time)
  • Parameters:
    • string $form
      THe form name
    • array $fields
      of string. The fields we want returned
    • boolean $parent
      Defaults to false. If it is scalar and non-boolean, it is consider to be the ID of the parent, and then we get all forms with parent the given id. If true, we return the parent as one of the fields.
      • Default Value: false
    • array $where_data
      contains the where clause information about this form or a nested
      • Default Value: array()
    • array $ordering
      An array of fields to order by. Defaults to the empty array. Prepend a - to order by in descending order.
      • Default Value: array()
    • mixed $limit
      Defaults to false. It true, returns only one result. If an integer it is the numeber of records to limit to. If it is as an array of two integers, it is the offset and then number of results to limit to.
      • Default Value: false
    • integer $mod_time
      Defaults to -1. If non-negative, we only list the requested fields for an id if at least one of them has a modification time greater than or equal to $mod_time. If the form storage has no way of tracking modifucation time, all entries are listed.
      • Default Value: -1
  • Returns: mixed
    an array with key id's and value and array of values. the array of values has as keys the fields with their corresponding value.

listFields()

  • Defined in i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php on line 397
  • Signature: public function listFields($form,$fields,$parent,$where_data,$ordering,$limit,$mod_time)
  • Parameters:
    • string $form
      THe form name
    • array $fields
      of string. The fields we want returned
    • boolean $parent
      Defaults to false. If it is scalar and non-boolean, it is consider to be the ID of the parent, and then we get all forms with parent the given id. If true, we return the parent as one of the fields.
      • Default Value: false
    • array $where_data
      contains the where clause information about this form or a nested
      • Default Value: array()
    • array $ordering
      An array of fields to order by. Defaults to the empty array. Prepend a - to order by in descending order.
      • Default Value: array()
    • mixed $limit
      Defaults to false. It true, returns only one result. If an integer it is the numeber of records to limit to. If it is as an array of two integers, it is the offset and then number of results to limit to.
      • Default Value: false
    • integer $mod_time
      Defaults to -1. If non-negative, we only list the requested fields for an id if at least one of them has a modification time greater than or equal to $mod_time. If the form storage has no way of tracking modifucation time, all entries are listed.
      • Default Value: -1
  • Returns: mixed
    an array with key id's and value and array of values. the array of values has as keys the fields with their corresponding value.

lookupDisplayField()

Looks up the display vlaue 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.

lookupField()

Looks up the db value 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.

orderByFields()

populate()

Populate the member variables of the object from the database.

quickSearch()

  • Defined in i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php on line 319
  • Signature: protected function quickSearch($form,$parent,$where_data,$limit)
  • Parameters:
    • string $form
      The form name.
    • boolean $parent
      Defaults to false. If it is scalar and non-boolean, it is consider to be the ID of the parent, and then we get all forms with parent the given id.
      • Default Value: false
    • mixed $where_data
      array or class implementing ArrayAccess, Iterator, and Countable (e.g. MagicDataNode) . the where data.
      • Default Value: array()
    • mixed $limit
      Defaults to false. It true, returns only one result. If an integer it is the numeber of records to limit to. If it is as an array of two integers, it is the offset and then number of results to limit to.
      • Default Value: false
  • Returns: mixed
    an array of matching form ids. However, ff $limit_one is true or 1 or array ($offset,1) then then we return either the id or false, if none found or there was an error.

save()

Save a form object into magicdata

search()

  • Defined in i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMagicData/lib/classDef/I2CE_FormStorage_magicdata.no_db.php on line 290
  • Signature: public function search($form,$parent,$where_data,$ordering,$limit)
  • Parameters:
    • string $form
      The form name.
    • boolean $parent
      Defaults to false. If it is scalar and non-boolean, it is consider to be the ID of the parent, and then we get all forms with parent the given id.
      • Default Value: false
    • mixed $where_data
      array or class implementing ArrayAccess, Iterator, and Countable (e.g. MagicDataNode) . the where data.
      • Default Value: array()
    • array $ordering
      An array of fields to order by. Defaults to the empty array. Prepend a - to order by in descending order.
      • Default Value: array()
    • mixed $limit
      Defaults to false. It true, returns only one result. If an integer it is the numeber of records to limit to. If it is as an array of two integers, it is the offset and then number of results to limit to.
      • Default Value: false
  • Returns: mixed
    an array of matching form ids. However, ff $limit_one is true or 1 or array ($offset,1) then then we return either the id or false, if none found or there was an error.

Inherited Methods

FF_IG_setSequence()

This public method is inherited from I2CE_FormStorage_Mechanism->FF_IG_setSequence()

getFormsById()

This public method is inherited from I2CE_FormStorage_Mechanism->getFormsById()

getIdsAsChild()

This public method is inherited from I2CE_FormStorage_Mechanism->getIdsAsChild()

populateHistory()

This public method is inherited from I2CE_FormStorage_Mechanism->populateHistory()

compareFormsByFields()

This protected method is inherited from I2CE_FormStorage_Mechanism->compareFormsByFields()

getLimitedFields()

This protected method is inherited from I2CE_FormStorage_Mechanism->getLimitedFields()

_hasMethod()

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

Inherited Variables

$name

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$name

$global_options

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$global_options

$ordering

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$ordering

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()