Class: I2CE FormStorage cached (4.1.7)

From IHRIS Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


This article describes the class I2CE_FormStorage_cached .

@filesource Class I2CE_FormStorage_cached

Variables

$preserve_ids

Determines if ids should show up in the getFields query.

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.

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
  • 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.

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.