Class: I2CE Module Lists: Difference between revisions
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
==Methods== | ==Methods== | ||
===action_initialize()=== | ===action_initialize()=== | ||
Method called when the module is enabled for the first time. | Method called when the module is enabled for the first time. @param boolean -- returns true on success. false on error. | ||
@param boolean -- returns true on success. false on error. | |||
*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 | Deletes id's of a list with field matchin a given value. Intended to be called after rempaFields has been succesfully called. | ||
rempaFields has been succesfully called. | |||
*Signature: static public function deleteMappedValues($list,$evals,$lookup_field) | *Signature: static public function deleteMappedValues($list,$evals,$lookup_field) | ||
* | *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 are the values we lookup on the form name | ||
* [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' | *Returns: voolean.<br/>true on success | ||
===getHooks()=== | ===getHooks()=== | ||
*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 | 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 | ||
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) | *Signature: static public function remapFields($list,$evals,$forms,$lookup_field) | ||
* | *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 are the values we lookup on the form name. If a list instance with the new id does not exist it creates it. | ||
* [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 in which case we do not try to update any form. | ||
* [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' | *Returns: boolean.<br/>true on success | ||
===upgrade()=== | ===upgrade()=== | ||
Upgrade module method | Upgrade module method | ||
*Signature: public function upgrade($old_vers,$new_vers) | *Signature: public function upgrade($old_vers,$new_vers) | ||
Parameters: | *Parameters: | ||
*$old_vers | *$old_vers | ||
*$new_vers | *$new_vers | ||
Line 50: | Line 41: | ||
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) | ||
*Parameters: | |||
** [[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 Fuzzy Methods== | ==Inherited Fuzzy Methods== | ||
===launchBackgroundProcess()=== | ===launchBackgroundProcess()=== |
Revision as of 22:40, 16 October 2009
This article desrcibes the class I2CE_Module_Lists.
- Extends the class: I2CE_Module.
- Location: Part of the module Lists in the package I2CE
- Source: Defined in the file modules/Forms/modules/Lists/lib/I2CE_Module_Lists.php
- 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.
- 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:
- 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'
- string $list
- 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
- Signature: public function validate_formfield($field_obj)
- Parameters:
- I2CE_FormField $field_obj
- Returns: boolean
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()