Class: I2CE Module Lists (Development): Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
This article describes the class ''I2CE_Module_Lists'' . | This article describes the class ''I2CE_Module_Lists'' . | ||
*Extends the class: [[Class: I2CE_Module (Development) | I2CE_Module]]. | *Extends the class: [[Class: I2CE_Module (Development) | I2CE_Module]]. | ||
*Location: Part of the module [[I2CE Module List (Development)#Lists|Lists]] in the package [https://launchpad.net/i2ce I2CE] 4. | *Location: Part of the module [[I2CE Module List (Development)#Lists|Lists]] in the package [https://launchpad.net/i2ce I2CE] 4.1-dev | ||
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php#L33 modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php] on line 33 | ||
*Author: Carl Leitner <litlfred@ibiblio.org> | *Author: Carl Leitner <litlfred@ibiblio.org> | ||
*Since: v3.2.3 | *Since: v3.2.3 | ||
Line 10: | Line 10: | ||
===action_initialize()=== | ===action_initialize()=== | ||
Method called when the module is enabled for the first time. @param boolean -- returns true on success. false on error. | Method called when the module is enabled for the first time. @param boolean -- returns true on success. false on error. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php#L305 i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php] on line 305 | ||
*Signature: public function action_initialize() | *Signature: public function action_initialize() | ||
===deleteMappedValues()=== | ===deleteMappedValues()=== | ||
Deletes id's of a list with field matchin a given value. Intended to be called after rempaFields has been succesfully called. | Deletes id's of a list with field matchin a given value. Intended to be called after rempaFields has been succesfully called. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php#L425 i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php] on line 425 | ||
*Signature: static public function deleteMappedValues($list,$evals,$lookup_field) | *Signature: static public function deleteMappedValues($list,$evals,$lookup_field) | ||
*Parameters: | *Parameters: | ||
Line 23: | Line 23: | ||
*Returns: voolean.<br/>true on success | *Returns: voolean.<br/>true on success | ||
===getHooks()=== | ===getHooks()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php#L39 i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php] on line 39 | ||
*Signature: static public function getHooks() | *Signature: static public function getHooks() | ||
===remapFields()=== | ===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 | 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 | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php#L330 i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php] on line 330 | ||
*Signature: static public function remapFields($list,$evals,$forms,$lookup_field) | *Signature: static public function remapFields($list,$evals,$forms,$lookup_field) | ||
*Parameters: | *Parameters: | ||
Line 37: | Line 37: | ||
***Default Value: 'name' | ***Default Value: 'name' | ||
*Returns: boolean.<br/>true on success | *Returns: boolean.<br/>true on success | ||
===remapID()=== | |||
method to remap a given id | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php#L67 i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php] on line 67 | |||
*Signature: public function remapID($form,$oldid,$newid) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $form | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $oldid | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $newid | |||
===remapID_hook()=== | |||
Hooked method to remap a given id | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php#L50 i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php] on line 50 | |||
*Signature: public function remapID_hook($args) | |||
*Parameters: | |||
**$args | |||
===upgrade()=== | ===upgrade()=== | ||
Upgrade module method | Upgrade module method | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php#L283 i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php] on line 283 | ||
*Signature: public function upgrade($old_vers,$new_vers) | *Signature: public function upgrade($old_vers,$new_vers) | ||
*Parameters: | *Parameters: | ||
Line 46: | Line 60: | ||
===validate_formfield()=== | ===validate_formfield()=== | ||
Hooked Function to check if a field is unique | Hooked Function to check if a field is unique | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php#L89 i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php] on line 89 | ||
*Signature: public function validate_formfield($field_obj) | *Signature: public function validate_formfield($field_obj) | ||
*Parameters: | *Parameters: | ||
Line 62: | Line 76: | ||
===action_enable()=== | ===action_enable()=== | ||
This public method is inherited from [[Class: I2CE_Module (Development)#action_enable() | I2CE_Module->action_enable()]] | This public method is inherited from [[Class: I2CE_Module (Development)#action_enable() | I2CE_Module->action_enable()]] | ||
===getCLIMethods()=== | ===getCLIMethods()=== |
Latest revision as of 08:16, 6 May 2015
This article describes the class I2CE_Module_Lists .
- Extends the class: I2CE_Module.
- Location: Part of the module Lists in the package I2CE 4.1-dev
- Source: Defined in the file modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php on line 33
- Author: Carl Leitner <litlfred@ibiblio.org>
- Since: v3.2.3
@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.
- Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php on line 305
- 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.
- Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php on line 425
- Signature: static public function deleteMappedValues($list,$evals,$lookup_field)
- Parameters:
- Returns: voolean.
true on success
getHooks()
- Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php on line 39
- 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
- Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php on line 330
- 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'
- string $list
- Returns: boolean.
true on success
remapID()
method to remap a given id
- Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php on line 67
- Signature: public function remapID($form,$oldid,$newid)
- Parameters:
remapID_hook()
Hooked method to remap a given id
- Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php on line 50
- Signature: public function remapID_hook($args)
- Parameters:
- $args
upgrade()
Upgrade module method
- Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php on line 283
- Signature: public function upgrade($old_vers,$new_vers)
- Parameters:
- $old_vers
- $new_vers
validate_formfield()
Hooked Function to check if a field is unique
- Defined in i2ce/modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php on line 89
- Signature: public function validate_formfield($field_obj)
- Parameters:
- I2CE_FormField $field_obj
Inherited Methods
__construct()
This public method is inherited from I2CE_Module->__construct()
action_configure()
This public method is inherited from I2CE_Module->action_configure()
action_disable()
This public method is inherited from I2CE_Module->action_disable()
action_enable()
This public method is inherited from I2CE_Module->action_enable()
getCLIMethods()
This public method is inherited from I2CE_Module->getCLIMethods()
getConfig()
This public method is inherited from I2CE_Module->getConfig()
getMethods()
This public method is inherited from I2CE_Module->getMethods()
post_update()
This public method is inherited from I2CE_Module->post_update()
pre_upgrade()
This public method is inherited from I2CE_Module->pre_upgrade()
_hasMethod()
This public method is inherited from I2CE_Fuzzy->_hasMethod()
Inherited Fuzzy Methods
launchBackgroundProcess()
This method is inherited from I2CE_Module->launchBackgroundProcess()
launchBackgroundPHPScript()
This method is inherited from I2CE_Module->launchBackgroundPHPScript()
launchBackgroundPage()
This method is inherited from I2CE_Module->launchBackgroundPage()
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()