Class: iHRIS Module Contact: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This article desrcibes the class '''iHRIS_Module_Contact''' | This article desrcibes the class '''iHRIS_Module_Contact'''. | ||
*Extends the class: [[Class: I2CE_Module | I2CE_Module]]. | |||
It is contained in the module [[iHRIS Module List#Contact|Contact]] in the package [https://launchpad.net/ihris-common iHRIS Common] | It is contained in the module [[iHRIS Module List#Contact|Contact]] in the package [https://launchpad.net/ihris-common iHRIS Common] | ||
Line 26: | Line 27: | ||
*Returns: boolean. True on success. | *Returns: boolean. True on success. | ||
Parameters: | Parameters: | ||
* [http://www.php.net/manual/en/language.types.string.php string] $parent_form<br/>The parent form | * [http://www.php.net/manual/en/language.types.string.php string ] $parent_form<br/>The parent form | ||
*$contact_type | *$contact_type | ||
* [http://www.php.net/manual/en/language.types.string.php string] $new_child_form<br/>The new child form (which should subclass contact) in which the existing values are to be saved. | * [http://www.php.net/manual/en/language.types.string.php string ] $new_child_form<br/>The new child form (which should subclass contact) in which the existing values are to be saved. | ||
* [http://www.php.net/manual/en/language.types.boolean.php boolean] $delete_old<br/>If true the old child (matching) forms are removed | * [http://www.php.net/manual/en/language.types.boolean.php boolean ] $delete_old<br/>If true the old child (matching) forms are removed | ||
* [http://www.php.net/manual/en/language.types.boolean.php boolean] $remove_contact<br/>Defaults to true in which case we remove 'contact' as a child form | * [http://www.php.net/manual/en/language.types.boolean.php boolean ] $remove_contact<br/>Defaults to true in which case we remove 'contact' as a child form | ||
**Default Value: true | **Default Value: true | ||
===pre_upgrade()=== | ===pre_upgrade()=== | ||
Line 36: | Line 37: | ||
has been changed from the config. | has been changed from the config. | ||
*Signature: public function pre_upgrade($old_vers,$new_vers,$new_storage) | *Signature: public function pre_upgrade($old_vers,$new_vers,$new_storage) | ||
*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: | ||
* [http://www.php.net/manual/en/language.types.string.php string] $old_vers | * [http://www.php.net/manual/en/language.types.string.php string ] $old_vers | ||
* [http://www.php.net/manual/en/language.types.string.php string] $new_vers | * [http://www.php.net/manual/en/language.types.string.php string ] $new_vers | ||
* [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $new_storage | * [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $new_storage | ||
===removeContactForm()=== | ===removeContactForm()=== | ||
Line 46: | Line 47: | ||
*Returns: booelan. true on success | *Returns: booelan. true on success | ||
Parameters: | Parameters: | ||
* [http://www.php.net/manual/en/language.types.string.php string] $parent_form | * [http://www.php.net/manual/en/language.types.string.php string ] $parent_form | ||
===upgrade()=== | ===upgrade()=== | ||
Upgrade this module if necessary | Upgrade this module if necessary | ||
*Signature: public function upgrade($old_vers,$new_vers) | *Signature: public function upgrade($old_vers,$new_vers) | ||
*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: | ||
* [http://www.php.net/manual/en/language.types.string.php string] $old_vers | * [http://www.php.net/manual/en/language.types.string.php string ] $old_vers | ||
* [http://www.php.net/manual/en/language.types.string.php string] $new_vers | * [http://www.php.net/manual/en/language.types.string.php string ] $new_vers | ||
==Inherited Fuzzy Methods== | ==Inherited Fuzzy Methods== | ||
===launchBackgroundProcess()=== | ===launchBackgroundProcess()=== |
Revision as of 22:24, 16 October 2009
This article desrcibes the class iHRIS_Module_Contact.
- Extends the class: I2CE_Module.
It is contained in the module Contact in the package iHRIS Common
The class is defined in the file: modules/Contact/lib/iHRIS_Module_Contact.php
I2CE_Module_Contact @subpackage Common
- Author: Luke Duncan <lduncan@intrahealth.org>
- Author: Carl Leitner <litlfred@intrahealth.org>
- Since: 3.2.3
Variables
$constant_migrate
@var protected static $constant_migraate array with keys the numeric ids of contact types before the new I2CE_FormField_MAPPED was introduced. The values are the corresponding id's after I2CE_FormField_MAPPED.
- Type: static protected $constant_migrate
Methods
changeContactForm()
Change the all child contact form with given type of a form to a form which subclasses the contact form.
@param string This function assumes that iHRIS_Module_Contact->upgrade() has been called for $new_vers >= 3.2.5 so that the $contact_type should be one of the values of {@link iHRIS_Module_Contact::$contact_type}. E.g. 'contact_type|facilty'
- Signature: static public function changeContactForm($parent_form,$contact_type,$new_child_form,$delete_old,$remove_contact)
- Returns: boolean. True on success.
Parameters:
- string $parent_form
The parent form - $contact_type
- string $new_child_form
The new child form (which should subclass contact) in which the existing values are to be saved. - boolean $delete_old
If true the old child (matching) forms are removed - boolean $remove_contact
Defaults to true in which case we remove 'contact' as a child form- Default Value: true
pre_upgrade()
Run the pre upgrade for this module. This can use the old config data before it has been changed from the config.
- Signature: public function pre_upgrade($old_vers,$new_vers,$new_storage)
- Returns: boolean
Parameters:
- string $old_vers
- string $new_vers
- I2CE_MagicDataNode $new_storage
removeContactForm()
Remove the contact form from the given parent form
- Signature: static public function removeContactForm($parent_form)
- Returns: booelan. true on success
Parameters:
- string $parent_form
upgrade()
Upgrade this module if necessary
- Signature: public function upgrade($old_vers,$new_vers)
- Returns: boolean
Parameters:
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()