Class: I2CE Module Lists: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 2: Line 2:
*Extends the class: [[Class: I2CE_Module | I2CE_Module]].
*Extends the class: [[Class: I2CE_Module | I2CE_Module]].
*Parent Classses:  [[Class: I2CE_Module | I2CE_Module]] [[Class: I2CE_Fuzzy | I2CE_Fuzzy]]
*Parent Classses:  [[Class: I2CE_Module | I2CE_Module]] [[Class: I2CE_Fuzzy | I2CE_Fuzzy]]
*Location: Part of the module [[iHRIS Module List#Lists|Lists]] in the package [https://launchpad.net/i2ce I2CE]
*Location: Part of the module [[I2CE Module List#Lists|Lists]] in the package [https://launchpad.net/i2ce I2CE]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.0-release/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.0-release/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php]
*Author: Carl Leitner <litlfred@ibiblio.org>
*Author: Carl Leitner <litlfred@ibiblio.org>
Line 45: Line 45:
** [[Class: I2CE_FormField | I2CE_FormField]] $field_obj
** [[Class: I2CE_FormField | I2CE_FormField]] $field_obj
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
==Inherited Methods==
===__construct()===
This public method is inherited from [[Class: I2CE_Module#__construct() | I2CE_Module->__construct()]]
===action_configure()===
This public method is inherited from [[Class: I2CE_Module#action_configure() | I2CE_Module->action_configure()]]
===action_disable()===
This public method is inherited from [[Class: I2CE_Module#action_disable() | I2CE_Module->action_disable()]]
===action_enable()===
This public method is inherited from [[Class: I2CE_Module#action_enable() | I2CE_Module->action_enable()]]
===conflict_external()===
This public method is inherited from [[Class: I2CE_Module#conflict_external() | I2CE_Module->conflict_external()]]
===getCLIHooks()===
This public method is inherited from [[Class: I2CE_Module#getCLIHooks() | I2CE_Module->getCLIHooks()]]
===getCLIMethods()===
This public method is inherited from [[Class: I2CE_Module#getCLIMethods() | I2CE_Module->getCLIMethods()]]
===getConfig()===
This public method is inherited from [[Class: I2CE_Module#getConfig() | I2CE_Module->getConfig()]]
===getMethods()===
This public method is inherited from [[Class: I2CE_Module#getMethods() | I2CE_Module->getMethods()]]
===post_update()===
This public method is inherited from [[Class: I2CE_Module#post_update() | I2CE_Module->post_update()]]
===pre_upgrade()===
This public method is inherited from [[Class: I2CE_Module#pre_upgrade() | I2CE_Module->pre_upgrade()]]
===requirement_external()===
This public method is inherited from [[Class: I2CE_Module#requirement_external() | I2CE_Module->requirement_external()]]
===_hasMethod()===
This public method is inherited from [[Class: I2CE_Fuzzy#_hasMethod() | I2CE_Fuzzy->_hasMethod()]]
==Inherited Fuzzy Methods==
===launchBackgroundProcess()===
This method is inherited from [[Class: I2CE_Module#launchBackgroundProcess() | I2CE_Module->launchBackgroundProcess()]]
===launchBackgroundPHPScript()===
This method is inherited from [[Class: I2CE_Module#launchBackgroundPHPScript() | I2CE_Module->launchBackgroundPHPScript()]]
===launchBackgroundPage()===
This method is inherited from [[Class: I2CE_Module#launchBackgroundPage() | I2CE_Module->launchBackgroundPage()]]
===userMessage()===
This method is inherited from [[Class: I2CE_Fuzzy#userMessage() | I2CE_Fuzzy->userMessage()]]




[[Category:Class Documentation]]
[[Category:Class Documentation]]

Revision as of 12:09, 19 October 2009

This article describes the class I2CE_Module_Lists.

@filesource Class I2CE_Module_Lists

Methods

action_initialize()

Method called when the module is enabled for the first time. @param boolean -- returns true on success. false on error.

  • Signature: public function action_initialize()

deleteMappedValues()

Deletes id's of a list with field matchin a given value. Intended to be called after rempaFields has been succesfully called.

  • Signature: static public function deleteMappedValues($list,$evals,$lookup_field)
  • Parameters:
    • string $list
      the list form.
    • array $evals
      an array when keys the new id you want the value to be. the values are the values we lookup on the form name
    • string $lookup_field
      the name of the list field to lookup on. Defaults to 'name'
      • Default Value: 'name'
  • Returns: voolean.
    true on success

getHooks()

  • Signature: static public function getHooks()

remapFields()

Remaps the list values of the given list based on the field to lookup on for the form @param string $mapped_field. the mapped field of $form. The Defaults to null in which case then mapped field that is used is the $list

  • Signature: static public function remapFields($list,$evals,$forms,$lookup_field)
  • Parameters:
    • string $list
      the list form.
    • array $evals
      an array when keys the new id you want the value to be. the values are the values we lookup on the form name. If a list instance with the new id does not exist it creates it.
    • array $forms
      an array of string keys are forms values are mapped fields. Defulats to false in which case we do not try to update any form.
      • Default Value: false
    • string $lookup_field
      the name of the list field to lookup on. Defaults to 'name'
      • Default Value: 'name'
  • Returns: boolean.
    true on success

upgrade()

Upgrade module method

  • Signature: public function upgrade($old_vers,$new_vers)
  • Parameters:
    • $old_vers
    • $new_vers

validate_formfield()

Hooked Function to check if a field is unique