Class: I2CE Module Lists: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This article desrcibes the class '''I2CE_Module_Lists''' | This article desrcibes the class '''I2CE_Module_Lists'''. | ||
*Extends the class: [[Class: I2CE_Module | I2CE_Module]]. | |||
It is contained in the module [[iHRIS Module List#Lists|Lists]] in the package [https://launchpad.net/i2ce I2CE] | It is contained in the module [[iHRIS Module List#Lists|Lists]] in the package [https://launchpad.net/i2ce I2CE] | ||
Line 21: | Line 22: | ||
*Returns: voolean. true on success | *Returns: voolean. true on success | ||
Parameters: | Parameters: | ||
* [http://www.php.net/manual/en/language.types.string.php string] $list<br/>the list form. | * [http://www.php.net/manual/en/language.types.string.php string ] $list<br/>the list form. | ||
* [http://www.php.net/manual/en/language.types.array.php array] $evals<br/>an array when keys the new id you want the value to be. the values | * [http://www.php.net/manual/en/language.types.array.php array ] $evals<br/>an array when keys the new id you want the value to be. the values | ||
* [http://www.php.net/manual/en/language.types.string.php string] $lookup_field<br/>the name of the list field to lookup on. Defaults to 'name' | * [http://www.php.net/manual/en/language.types.string.php string ] $lookup_field<br/>the name of the list field to lookup on. Defaults to 'name' | ||
**Default Value: 'name' | **Default Value: 'name' | ||
===getHooks()=== | ===getHooks()=== | ||
Line 38: | Line 39: | ||
*Returns: boolean. true on success | *Returns: boolean. true on success | ||
Parameters: | Parameters: | ||
* [http://www.php.net/manual/en/language.types.string.php string] $list<br/>the list form. | * [http://www.php.net/manual/en/language.types.string.php string ] $list<br/>the list form. | ||
* [http://www.php.net/manual/en/language.types.array.php array] $evals<br/>an array when keys the new id you want the value to be. the values | * [http://www.php.net/manual/en/language.types.array.php array ] $evals<br/>an array when keys the new id you want the value to be. the values | ||
* [http://www.php.net/manual/en/language.types.array.php array] $forms<br/>an array of string keys are forms values are mapped fields. Defulats to false | * [http://www.php.net/manual/en/language.types.array.php array ] $forms<br/>an array of string keys are forms values are mapped fields. Defulats to false | ||
**Default Value: false | **Default Value: false | ||
* [http://www.php.net/manual/en/language.types.string.php string] $lookup_field<br/>the name of the list field to lookup on. Defaults to 'name' | * [http://www.php.net/manual/en/language.types.string.php string ] $lookup_field<br/>the name of the list field to lookup on. Defaults to 'name' | ||
**Default Value: 'name' | **Default Value: 'name' | ||
===upgrade()=== | ===upgrade()=== | ||
Line 53: | Line 54: | ||
Hooked Function to check if a field is unique | Hooked Function to check if a field is unique | ||
*Signature: public function validate_formfield($field_obj) | *Signature: public function validate_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 ] | ||
Parameters: | Parameters: | ||
* [[Class: I2CE_FormField | I2CE_FormField]] $field_obj | * [[Class: I2CE_FormField | I2CE_FormField]] $field_obj |
Revision as of 21:25, 16 October 2009
This article desrcibes the class I2CE_Module_Lists.
- Extends the class: I2CE_Module.
It is contained in the module Lists in the package I2CE
The class is defined in the file: modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php
@subpackage Core @filesource Class I2CE_Module_Lists
- Author: Carl Leitner <litlfred@ibiblio.org>
- Since: v3.2.3
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. are the values we lookup on the form name
- Signature: static public function deleteMappedValues($list,$evals,$lookup_field)
- Returns: voolean. true on success
Parameters:
- string $list
the list form. - array $evals
an array when keys the new id you want the value to be. the values - string $lookup_field
the name of the list field to lookup on. Defaults to 'name'- Default Value: 'name'
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 are the values we lookup on the form name. If a list instance with the new id does not exist it creates it. in which case we do not try to update any 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)
- Returns: boolean. true on success
Parameters:
- string $list
the list form. - array $evals
an array when keys the new id you want the value to be. the values - array $forms
an array of string keys are forms values are mapped fields. Defulats to false- Default Value: false
- string $lookup_field
the name of the list field to lookup on. Defaults to 'name'- Default Value: 'name'
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
- Signature: public function validate_formfield($field_obj)
- Returns: boolean
Parameters:
- I2CE_FormField $field_obj
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()