Class: I2CE FormStorage cached (4.1.7)
This article describes the class I2CE_FormStorage_cached .
- Extends the class: I2CE_FormStorage_flat.
- Location: Part of the module CachedForms in the package I2CE 4.1.7-release
- Source: Defined in the file modules/Forms/modules/CachedForms/lib/I2CE_FormStorage_cached.php on line 33
- Author: Luke Duncan <lduncan@intrahealth.org>
- Since: v4.1.1
@filesource Class I2CE_FormStorage_cached
Variables
$preserve_ids
Determines if ids should show up in the getFields query.
- Defined in i2ce/modules/Forms/modules/CachedForms/lib/I2CE_FormStorage_cached.php on line 38
- Type: protected boolean $preserve_ids
Methods
addFormIdToLimit()
Update the limits array to add the necessary form if it's an id field because that is needed for buildDataTree since ids always include the form for joining.
- Defined in i2ce/modules/Forms/modules/CachedForms/lib/I2CE_FormStorage_cached.php on line 88
- Signature: static protected function addFormIdToLimit($form,$limit)
- Parameters:
buildDataTree()
Build the data tree for the given list of fields and limits. This is called by I2CE_List::buildDataTree. See that for more details @see I2CE_List::buildDataTree
- Defined in i2ce/modules/Forms/modules/CachedForms/lib/I2CE_FormStorage_cached.php on line 130
- Signature: public function buildDataTree($fields,$forms,$displayed,$limits,$orders,$show_hidden)
- Parameters:
- array $fields
The fields to build the tree - array $forms
The selectable forms - array $displayed
The displayed forms for the tree - array $limits
The list of limits for each form. - array $orders
The order fields for each given form - int $show_hidden
0=non-hidden, 1=All, 2=hidden only. Defaults to 0- Default Value: 0
- array $fields
- Returns: array
The ordered list of all entries in the tree.
getFields()
Generates the SQL to select the required fields. This makes sure the form is cached and up to date. See I2CE_FormStoage_DB for additional comments on parameters. @see I2CE_FormStorage_DB::getRecords
- Defined in i2ce/modules/Forms/modules/CachedForms/lib/I2CE_FormStorage_cached.php on line 70
- Signature: public function getFields($form,$fields,$parent,$where_data,$ordering,$limit,$field_reference_callback,$mod_time,$user)
- Parameters:
- $form
- $fields
- Default Value: array()
- $parent
- $where_data
- Default Value: array()
- $ordering
- Default Value: array()
- $limit
- Default Value: false
- $field_reference_callback
- Default Value: null
- $mod_time
- Default Value: -1
- $user
- Default Value: false
getSQLField()
Return the field name with backticks for SQL queries given the form and field.
- Defined in i2ce/modules/Forms/modules/CachedForms/lib/I2CE_FormStorage_cached.php on line 113
- Signature: static public function getSQLField($form,$field)
- Parameters:
- Returns: string
getStorageOptions()
Gets the storage options for the given form. Since this is the cached version for this form then we don't want to use any options set for that and use what's needed for the cached tables.
- Defined in i2ce/modules/Forms/modules/CachedForms/lib/I2CE_FormStorage_cached.php on line 49
- Signature: protected function getStorageOptions($form)
- Parameters:
- string $form
- Returns: I2CE_MagicDataNode