Class: I2CE FormStorage entry (Development): Difference between revisions

From IHRIS Wiki
(Created page with '{{otherversions|Class: I2CE_FormStorage_entry}} This article describes the class ''I2CE_FormStorage_entry'' . *Extends the class: [[Class: I2CE_FormStorage_DB (Development) | I2C…')
 
No edit summary
Line 26: Line 26:
===FF_IG_setSequence()===
===FF_IG_setSequence()===
Set the value of this field to the next sequence for the form field.
Set the value of this field to the next sequence for the form field.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L947 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 947
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L966 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 966
*Signature: public function FF_IG_setSequence($form_field)
*Signature: public function FF_IG_setSequence($form_field)
*Parameters:
*Parameters:
Line 32: Line 32:
===FF_isSameValue()===
===FF_isSameValue()===
Checks to see if the value of the form field is the same as in the db
Checks to see if the value of the form field is the same as in the db
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L881 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 881
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L900 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 900
*Signature: protected function FF_isSameValue($form_field,$do_check)
*Signature: protected function FF_isSameValue($form_field,$do_check)
*Parameters:
*Parameters:
Line 40: Line 40:
===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-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L969 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 969
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L988 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 988
*Signature: public function FF_populateHistory($form_field)
*Signature: public function FF_populateHistory($form_field)
*Parameters:
*Parameters:
Line 47: Line 47:
===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-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L906 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 906
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L925 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 925
*Signature: public function FF_save($form_field,$do_check,$user)
*Signature: public function FF_save($form_field,$do_check,$user)
*Parameters:
*Parameters:
Line 62: Line 62:
===delete()===
===delete()===
Deletes a form from the entry tables.
Deletes a form from the entry tables.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L799 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 799
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L818 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 818
*Signature: public function delete($form,$transact,$complete,$no_history)
*Signature: public function delete($form,$transact,$complete,$no_history)
*Parameters:
*Parameters:
Line 72: Line 72:
===fieldDetails()===
===fieldDetails()===
Return an array of DB details for a given field to be used to build queries for that field.
Return an array of DB details for a given field to be used to build queries for that field.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L474 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 474
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L492 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 492
*Signature: protected function fieldDetails($form,$field,$field_count,$table_prefix,$table,$join_field)
*Signature: protected function fieldDetails($form,$field,$field_count,$table_prefix,$table,$join_field)
*Parameters:
*Parameters:
Line 88: Line 88:
===getFieldId()===
===getFieldId()===
Return the id for the field in the field table. If the field doesn't currently exist then it will be created.
Return the id for the field in the field table. If the field doesn't currently exist then it will be created.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L411 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 411
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L429 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 429
*Signature: protected function getFieldId($name,$type)
*Signature: protected function getFieldId($name,$type)
*Parameters:
*Parameters:
Line 96: Line 96:
===getFields()===
===getFields()===
Generates a SQL to select the required fields. @param mixed $expr array or class implementing ArrayAccess, Iterator, and Countable (e.g. MagicDataNode) . the where data. @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"
Generates a SQL to select the required fields. @param mixed $expr array or class implementing ArrayAccess, Iterator, and Countable (e.g. MagicDataNode) . the where data. @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-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L206 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 206
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L224 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 224
*Signature: public function getFields($form,$fields,$parent,$where_data,$ordering,$limit,$field_reference_callback,$mod_time)
*Signature: public function getFields($form,$fields,$parent,$where_data,$ordering,$limit,$field_reference_callback,$mod_time)
*Parameters:
*Parameters:
Line 116: Line 116:
===getFormFieldIdAndType()===
===getFormFieldIdAndType()===
Return the form field id for the given form and field and the data type for that field. @param string $form The name of the form. @param string $field The name of the field.
Return the form field id for the given form and field and the data type for that field. @param string $form The name of the form. @param string $field The name of the field.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L439 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 439
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L457 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 457
*Signature: protected function getFormFieldIdAndType($form_name,$field_name)
*Signature: protected function getFormFieldIdAndType($form_name,$field_name)
*Parameters:
*Parameters:
Line 124: Line 124:
===getFormId()===
===getFormId()===
Returns the id from the form table in the database. If the form doesn't currently exist then it will be created and the new id will be returned.
Returns the id from the form table in the database. If the form doesn't currently exist then it will be created and the new id will be returned.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L373 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 373
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L391 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 391
*Signature: protected function getFormId($form,$nocreate)
*Signature: protected function getFormId($form,$nocreate)
*Parameters:
*Parameters:
Line 137: Line 137:
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form
** [http://www.php.net/manual/en/language.types.string.php string ] $form
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $fields <br/>Either a string, the field, or an array of string, the fields.
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $fields <br/>Either a string, the field, or an array of string, the fields. Can also include the special field "last_modified" to get the last modification time on any of the fields
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $id <br/>Defaults to null.  If non-null it is the id that we wish to limit to.
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $id <br/>Defaults to null.  If non-null it is the id that we wish to limit to.
***Default Value: null
***Default Value: null
Line 153: Line 153:
===populateHistory()===
===populateHistory()===
Populates the history of each field given to the method.
Populates the history of each field given to the method.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L696 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 696
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L714 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 714
*Signature: public function populateHistory($form)
*Signature: public function populateHistory($form)
*Parameters:
*Parameters:
Line 159: Line 159:
===prepareCheckStatement()===
===prepareCheckStatement()===
Prepare the check statements for the given field type
Prepare the check statements for the given field type
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L671 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 671
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L689 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 689
*Signature: protected function prepareCheckStatement($type_string)
*Signature: protected function prepareCheckStatement($type_string)
*Parameters:
*Parameters:
Line 166: Line 166:
===prepareRecordStatement()===
===prepareRecordStatement()===
Prepare the record table save statements for insert or update.
Prepare the record table save statements for insert or update.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L608 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 608
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L626 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 626
*Signature: protected function prepareRecordStatement($type)
*Signature: protected function prepareRecordStatement($type)
*Parameters:
*Parameters:
Line 173: Line 173:
===prepareSaveStatement()===
===prepareSaveStatement()===
Prepare the save statement for the given field type.
Prepare the save statement for the given field type.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L581 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 581
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L599 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 599
*Signature: protected function prepareSaveStatement($field_type_db,$field_type_string,$field_type_mdb2)
*Signature: protected function prepareSaveStatement($field_type_db,$field_type_string,$field_type_mdb2)
*Parameters:
*Parameters:
Line 182: Line 182:
===prepareSetupFormStatement()===
===prepareSetupFormStatement()===
Prepare the setupForm statements for select and delete.
Prepare the setupForm statements for select and delete.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L637 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 637
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L655 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 655
*Signature: protected function prepareSetupFormStatement($type)
*Signature: protected function prepareSetupFormStatement($type)
*Parameters:
*Parameters:
Line 189: Line 189:
===save()===
===save()===
Save a form object into entry tables.
Save a form object into entry tables.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L711 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 711
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L729 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 729
*Signature: public function save($form,$user,$transact)
*Signature: public function save($form,$user,$transact)
*Parameters:
*Parameters:
Line 197: Line 197:
===setupForm()===
===setupForm()===
Populates the form and field ids for all the fields for this form. If the form or fields don't exist yet they will be created.
Populates the form and field ids for all the fields for this form. If the form or fields don't exist yet they will be created.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L514 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 514
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php#L532 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php] on line 532
*Signature: protected function setupForm($form)
*Signature: protected function setupForm($form)
*Parameters:
*Parameters:

Revision as of 07:56, 3 August 2010


This article describes the class I2CE_FormStorage_entry .

I2CE_FormStorage_entry

Variables

$prepared

A list of all prepared statements for working with entry data.

$form_field_data_cache

Keys are form names values are arrays with keys fields and values an array for the form field id and details

$form_id_cache

Keys are form names values are their id's

Methods

FF_IG_setSequence()

Set the value of this field to the next sequence for the form field.

FF_isSameValue()

Checks to see if the value of the form field is the same as in the db

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

delete()

Deletes a form from the entry tables.

fieldDetails()

Return an array of DB details for a given field to be used to build queries for that field.

  • Defined in i2ce/modules/Forms/modules/FormStorage/modules/FormStorageEntry/lib/I2CE_FormStorage_entry.php on line 492
  • Signature: protected function fieldDetails($form,$field,$field_count,$table_prefix,$table,$join_field)
  • Parameters:
    • string $form
      The form.
    • string $field
      The field being looked up.
    • integer $field_count
      If you're building a query with multiple fields this is the count for the table alias.
      • Default Value: 1
    • string $table_prefix
      The table alias prefix to go along with the field count.
      • Default Value: "e"
    • string $table
      The table to do the lookups on. This will most often be last_entry but in some cases you may want to use entry instead.
      • Default Value: "last_entry"
    • string $join_field
      The join field to use for the table's record field to join on. By default it will use the first last_entry (e1) record field.
      • Default Value: null
  • Returns: array

getFieldId()

Return the id for the field in the field table. If the field doesn't currently exist then it will be created.

getFields()

Generates a SQL to select the required fields. @param mixed $expr array or class implementing ArrayAccess, Iterator, and Countable (e.g. MagicDataNode) . the where data. @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/FormStorageEntry/lib/I2CE_FormStorage_entry.php on line 224
  • Signature: public function getFields($form,$fields,$parent,$where_data,$ordering,$limit,$field_reference_callback,$mod_time)
  • Parameters:
    • string $form
      The form we are select from
    • array $fields
      of string. the fields that we want to select. the keys are the fields names, the values are what we wish to select them as.
      • Default Value: array()
    • 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.
    • $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
    • $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 $mod_time. If the form storage has no way of tracking modifucation time, all entries are listed.
      • Default Value: -1
  • Returns: string
    the SQL Query needed to get the form/field data or false on failure.

getFormFieldIdAndType()

Return the form field id for the given form and field and the data type for that field. @param string $form The name of the form. @param string $field The name of the field.

getFormId()

Returns the id from the form table in the database. If the form doesn't currently exist then it will be created and the new id will be returned.

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/FormStorageEntry/lib/I2CE_FormStorage_entry.php on line 88
  • 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. Can also include the special field "last_modified" to get the last modification time on any of 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 storage mechansim implements the writing methods.

populateHistory()

Populates the history of each field given to the method.

prepareCheckStatement()

Prepare the check statements for the given field type

prepareRecordStatement()

Prepare the record table save statements for insert or update.

prepareSaveStatement()

Prepare the save statement for the given field type.

prepareSetupFormStatement()

Prepare the setupForm statements for select and delete.

save()

Save a form object into entry tables.

setupForm()

Populates the form and field ids for all the fields for this form. If the form or fields don't exist yet they will be created.

Inherited Methods

getIdsAsChild()

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

getRecords()

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

listDisplayFields()

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

listFields()

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

lookupDisplayField()

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

lookupField()

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

populate()

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

search()

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

queryLastListCount()

This protected method is inherited from I2CE_FormStorage_DB->queryLastListCount()

getFormsById()

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

setStorageOptions()

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

compareFormsByFields()

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

getLimitedFields()

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

getStorageOptions()

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

_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

$storage_options_cache

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$storage_options_cache

$ordering

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$ordering

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()