Class: I2CE Module: Difference between revisions
No edit summary |
No edit summary |
||
Line 70: | Line 70: | ||
** [[Class: I2CE_Module_User | I2CE_Module_User]] | ** [[Class: I2CE_Module_User | I2CE_Module_User]] | ||
*Location: Part of the module [[I2CE Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] | *Location: Part of the module [[I2CE Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE] | ||
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0. | *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L34 lib/I2CE_Module.php] on line 34 | ||
The abstract class for that all modules must implement | The abstract class for that all modules must implement | ||
==Methods== | ==Methods== | ||
===__construct()=== | ===__construct()=== | ||
Construct this object | Construct this object | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L41 i2ce/lib/I2CE_Module.php] on line 41 | |||
*Signature: public function __construct() | *Signature: public function __construct() | ||
===action_configure()=== | ===action_configure()=== | ||
Method called to perform the configuration for this module All the configuration should take place within the div with id 'moduleConfiguration' | Method called to perform the configuration for this module All the configuration should take place within the div with id 'moduleConfiguration' | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L124 i2ce/lib/I2CE_Module.php] on line 124 | |||
*Signature: public function action_configure() | *Signature: public function action_configure() | ||
===action_disable()=== | ===action_disable()=== | ||
Perform any actions that a module needs to when it is disabled. | Perform any actions that a module needs to when it is disabled. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L242 i2ce/lib/I2CE_Module.php] on line 242 | |||
*Signature: public function action_disable() | *Signature: public function action_disable() | ||
*Returns: boolean.<br/>Returns true on success, returns false on failure and prevents the module from being disabled. | *Returns: boolean.<br/>Returns true on success, returns false on failure and prevents the module from being disabled. | ||
===action_enable()=== | ===action_enable()=== | ||
Perform any actions that a module needs to when it is enabled. | Perform any actions that a module needs to when it is enabled. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L232 i2ce/lib/I2CE_Module.php] on line 232 | |||
*Signature: public function action_enable() | *Signature: public function action_enable() | ||
*Returns: boolean.<br/>Returns true on success, returns false on failure and prevents the module from being enabled. | *Returns: boolean.<br/>Returns true on success, returns false on failure and prevents the module from being enabled. | ||
===action_initialize()=== | ===action_initialize()=== | ||
Method called before the module is enabled for the first time. @param boolean -- returns true on success. false on error. | Method called before 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.0.2-release/annotate/head:/lib/I2CE_Module.php#L115 i2ce/lib/I2CE_Module.php] on line 115 | |||
*Signature: public function action_initialize() | *Signature: public function action_initialize() | ||
===conflict_external()=== | ===conflict_external()=== | ||
Checks to see if a an external conflict is matched | Checks to see if a an external conflict is matched | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L83 i2ce/lib/I2CE_Module.php] on line 83 | |||
*Signature: public function conflict_external($ext,$req_data) | *Signature: public function conflict_external($ext,$req_data) | ||
*Parameters: | *Parameters: | ||
Line 99: | Line 105: | ||
===getCLIHooks()=== | ===getCLIHooks()=== | ||
Method called to get the modules' hooks which are run from the command line pages | Method called to get the modules' hooks which are run from the command line pages | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L177 i2ce/lib/I2CE_Module.php] on line 177 | |||
*Signature: static public function getCLIHooks() | *Signature: static public function getCLIHooks() | ||
*Returns: an<br/>associative array where the key is the hookname and the value is mixed. The first option for the value is that it is a string. This string is the method name to call. <br/> The second option for the value is that it is an array. This array has key 'method' with value the method of the class to call at the indicated hook. It also has key 'proiority' which gives a scheduling priority to the action. <br/> Example we may return: array('pre_page_display'=>array('method'=>'doSomething,'prioriy'=>10), 'post_page_display'=>'array('method'=>doSomethingElse,'priority'=>50), 'post_configure'=>'andNowForSomethingCompletelyDifferent') Each of the methods takes either 0 or 1 argument depending on the hook. For a complete list of hooks and their arguments see.... | *Returns: an<br/>associative array where the key is the hookname and the value is mixed. The first option for the value is that it is a string. This string is the method name to call. <br/> The second option for the value is that it is an array. This array has key 'method' with value the method of the class to call at the indicated hook. It also has key 'proiority' which gives a scheduling priority to the action. <br/> Example we may return: array('pre_page_display'=>array('method'=>'doSomething,'prioriy'=>10), 'post_page_display'=>'array('method'=>doSomethingElse,'priority'=>50), 'post_configure'=>'andNowForSomethingCompletelyDifferent') Each of the methods takes either 0 or 1 argument depending on the hook. For a complete list of hooks and their arguments see.... | ||
===getCLIMethods()=== | ===getCLIMethods()=== | ||
Any 'fuzzy' methods that this module implements on the command line. | Any 'fuzzy' methods that this module implements on the command line. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L220 i2ce/lib/I2CE_Module.php] on line 220 | |||
*Signature: static public function getCLIMethods() | *Signature: static public function getCLIMethods() | ||
*Returns: an<br/>associative array. the keys are the form of $key = '$class::$method' where $class is the name of a class which is an instance of I2CE_FuzzyMethod and $method is the name of a $method we wish to add to the class $class and which is not already in the class. the value is the name of a public function in the I2CE_Module subclass which will handle the call to $method. Example: array('I2CE_Template->setForm'=>'setForm') You also have the option of array('I2CE_Template->setForm'=>array('method'=>'setForm','priority'=>100) If you wish to set a priority. The default proiority is the priority of the module | *Returns: an<br/>associative array. the keys are the form of $key = '$class::$method' where $class is the name of a class which is an instance of I2CE_FuzzyMethod and $method is the name of a $method we wish to add to the class $class and which is not already in the class. the value is the name of a public function in the I2CE_Module subclass which will handle the call to $method. Example: array('I2CE_Template->setForm'=>'setForm') You also have the option of array('I2CE_Template->setForm'=>array('method'=>'setForm','priority'=>100) If you wish to set a priority. The default proiority is the priority of the module | ||
===getConfig()=== | ===getConfig()=== | ||
Get the configuration data for this module | Get the configuration data for this module | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L107 i2ce/lib/I2CE_Module.php] on line 107 | |||
*Signature: public function getConfig() | *Signature: public function getConfig() | ||
*Returns: [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] | *Returns: [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] | ||
===getHooks()=== | ===getHooks()=== | ||
Method called to get the modules' hooks | Method called to get the modules' hooks | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L151 i2ce/lib/I2CE_Module.php] on line 151 | |||
*Signature: static public function getHooks() | *Signature: static public function getHooks() | ||
*Returns: an<br/>associative array where the key is the hookname and the value is mixed. The first option for the value is that it is a string. This string is the method name to call. The priority for the method in this case is the priority of the module <br/> The second options is is that each value consists of an array with keys integers, the priority, and values the methods <br/> Example we may return: array('post_configure'=>'andNowForSomethingCompletelyDifferent', 'post_junk'=>array( -10=>'method0' 10=>'method1' 100=>'method2' 1004=>'method3' ) ) <br/> Each of the methods takes either 0 or 1 argument depending on the hook. For a complete list of hooks and their arguments see.... | *Returns: an<br/>associative array where the key is the hookname and the value is mixed. The first option for the value is that it is a string. This string is the method name to call. The priority for the method in this case is the priority of the module <br/> The second options is is that each value consists of an array with keys integers, the priority, and values the methods <br/> Example we may return: array('post_configure'=>'andNowForSomethingCompletelyDifferent', 'post_junk'=>array( -10=>'method0' 10=>'method1' 100=>'method2' 1004=>'method3' ) ) <br/> Each of the methods takes either 0 or 1 argument depending on the hook. For a complete list of hooks and their arguments see.... | ||
===getMethods()=== | ===getMethods()=== | ||
Any 'fuzzy' methods that this module implements. | Any 'fuzzy' methods that this module implements. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L197 i2ce/lib/I2CE_Module.php] on line 197 | |||
*Signature: static public function getMethods() | *Signature: static public function getMethods() | ||
*Returns: an<br/>associative array. the keys are the form of $key = '$class::$method' where $class is the name of a class which is an instance of I2CE_FuzzyMethod and $method is the name of a $method we wish to add to the class $class and which is not already in the class. the value is the name of a public function in the I2CE_Module subclass which will handle the call to $method. Example: array('I2CE_Template->setForm'=>'setForm') You also have the option of array('I2CE_Template->setForm'=>array('method'=>'setForm','priority'=>100) If you wish to set a priority. The default proiority is the priority of the module | *Returns: an<br/>associative array. the keys are the form of $key = '$class::$method' where $class is the name of a class which is an instance of I2CE_FuzzyMethod and $method is the name of a $method we wish to add to the class $class and which is not already in the class. the value is the name of a public function in the I2CE_Module subclass which will handle the call to $method. Example: array('I2CE_Template->setForm'=>'setForm') You also have the option of array('I2CE_Template->setForm'=>array('method'=>'setForm','priority'=>100) If you wish to set a priority. The default proiority is the priority of the module | ||
===post_update()=== | ===post_update()=== | ||
Post Update this module if necessary | Post Update this module if necessary | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L60 i2ce/lib/I2CE_Module.php] on line 60 | |||
*Signature: public function post_update($old_vers,$new_vers) | *Signature: public function post_update($old_vers,$new_vers) | ||
*Parameters: | *Parameters: | ||
Line 126: | Line 138: | ||
===pre_upgrade()=== | ===pre_upgrade()=== | ||
Run the pre upgrade for this module. This can use the old config data before it has been changed from the config. | Run the pre upgrade for this module. This can use the old config data before it has been changed from the config. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L98 i2ce/lib/I2CE_Module.php] on line 98 | |||
*Signature: public function pre_upgrade($old_vers,$new_vers,$new_storage) | *Signature: public function pre_upgrade($old_vers,$new_vers,$new_storage) | ||
*Parameters: | *Parameters: | ||
Line 134: | Line 147: | ||
===requirement_external()=== | ===requirement_external()=== | ||
Checks to see if a an external requirement is avaialable | Checks to see if a an external requirement is avaialable | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L71 i2ce/lib/I2CE_Module.php] on line 71 | |||
*Signature: public function requirement_external($ext,$req_data) | *Signature: public function requirement_external($ext,$req_data) | ||
*Parameters: | *Parameters: | ||
Line 141: | Line 155: | ||
===upgrade()=== | ===upgrade()=== | ||
Upgrade this module if necessary | Upgrade this module if necessary | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Module.php#L50 i2ce/lib/I2CE_Module.php] on line 50 | |||
*Signature: public function upgrade($old_vers,$new_vers) | *Signature: public function upgrade($old_vers,$new_vers) | ||
*Parameters: | *Parameters: |
Revision as of 08:51, 10 November 2009
This article describes the abstract class I2CE_Module.
- Extends the class: I2CE_Fuzzy.
- Child Classes:
- I2CE_BackgroundProcess
- I2CE_Module_BinaryFiles
- iHRIS_Module_CEUs
- I2CE_Module_CachedForms
- I2CE_Module_ColorPicker
- iHRIS_Module_Contact
- iHRIS_Module_Currency
- I2CE_Module_CustomReports
- I2CE_DisplayData
- iHRIS_Module_Facility
- iHRIS_Module_FacilityContact
- I2CE_Module_Float
- I2CE_Module_FormWorm
- iHRIS_Module_Geography
- I2CE_Module_Core
- I2CE_Import_Export
- I2CE_Module_Lists
- I2CE_Module_Login
- iHRIS_Module_ManageRegistration
- I2CE_MootoolsCore
- I2CE_Module_Debugging
- I2CE_Module_MenuSelect
- I2CE_Module_StretchPage
- I2CE_Module_TreeSelect
- I2CE_Template_Options
- iHRIS_Module_Person
- iHRIS_Module_PersonContact
- iHRIS_Module_PersonDemographic
- iHRIS_Module_PersonEducation
- iHRIS_Module_PersonEmployment
- iHRIS_Module_PersonID
- iHRIS_Module_PersonLanguage
- iHRIS_Module_PersonNotes
- iHRIS_Module_PersonPassport
- iHRIS_Module_Resume
- I2CE_Module_Tags
- I2CE_Timer
- I2CE_Module_YAML
- I2CE_Module_FormLimits
- I2CE_Module_Forms
- I2CE_FormStorage
- I2CE_Module_FormStorageEntry
- iHRIS_Module
- iHRIS_Module_Manage
- iHRIS_Module_Application
- iHRIS_Module_Benefit
- iHRIS_Module_ManageJob
- iHRIS_Module_PersonPosition
- iHRIS_Module_ManageSalary
- iHRIS_Module_Manage_SampleData
- iHRIS_Module_Qualify
- iHRIS_Module_Qualify_SampleData
- I2CE_Module_Jumper
- I2CE_Module_LocaleSelector
- I2CE_MessageBox
- I2CE_MessageHandler
- I2CE_MessageNotice
- I2CE_Module_ModulePrompter
- iHRIS_Module_PersonSimpleCompetency
- iHRIS_Module_SimpleCompetency
- I2CE_Stub
- I2CE_Module_SwissFactory
- I2CE_Module_TemplateData
- iHRIS_Module_Training_Course
- iHRIS_Module_TrainingInstitution
- iHRIS_Module_TrainingSimpleCompetency
- I2CE_Module_User
- Location: Part of the module I2CE in the package I2CE
- Source: Defined in the file lib/I2CE_Module.php on line 34
The abstract class for that all modules must implement
Methods
__construct()
Construct this object
- Defined in i2ce/lib/I2CE_Module.php on line 41
- Signature: public function __construct()
action_configure()
Method called to perform the configuration for this module All the configuration should take place within the div with id 'moduleConfiguration'
- Defined in i2ce/lib/I2CE_Module.php on line 124
- Signature: public function action_configure()
action_disable()
Perform any actions that a module needs to when it is disabled.
- Defined in i2ce/lib/I2CE_Module.php on line 242
- Signature: public function action_disable()
- Returns: boolean.
Returns true on success, returns false on failure and prevents the module from being disabled.
action_enable()
Perform any actions that a module needs to when it is enabled.
- Defined in i2ce/lib/I2CE_Module.php on line 232
- Signature: public function action_enable()
- Returns: boolean.
Returns true on success, returns false on failure and prevents the module from being enabled.
action_initialize()
Method called before the module is enabled for the first time. @param boolean -- returns true on success. false on error.
- Defined in i2ce/lib/I2CE_Module.php on line 115
- Signature: public function action_initialize()
conflict_external()
Checks to see if a an external conflict is matched
- Defined in i2ce/lib/I2CE_Module.php on line 83
- Signature: public function conflict_external($ext,$req_data)
- Parameters:
- Returns: boolean
true if the external conflict is NOT met. In other words, if you have a valid conflict you should return false, otherwise you should return true
getCLIHooks()
Method called to get the modules' hooks which are run from the command line pages
- Defined in i2ce/lib/I2CE_Module.php on line 177
- Signature: static public function getCLIHooks()
- Returns: an
associative array where the key is the hookname and the value is mixed. The first option for the value is that it is a string. This string is the method name to call.
The second option for the value is that it is an array. This array has key 'method' with value the method of the class to call at the indicated hook. It also has key 'proiority' which gives a scheduling priority to the action.
Example we may return: array('pre_page_display'=>array('method'=>'doSomething,'prioriy'=>10), 'post_page_display'=>'array('method'=>doSomethingElse,'priority'=>50), 'post_configure'=>'andNowForSomethingCompletelyDifferent') Each of the methods takes either 0 or 1 argument depending on the hook. For a complete list of hooks and their arguments see....
getCLIMethods()
Any 'fuzzy' methods that this module implements on the command line.
- Defined in i2ce/lib/I2CE_Module.php on line 220
- Signature: static public function getCLIMethods()
- Returns: an
associative array. the keys are the form of $key = '$class::$method' where $class is the name of a class which is an instance of I2CE_FuzzyMethod and $method is the name of a $method we wish to add to the class $class and which is not already in the class. the value is the name of a public function in the I2CE_Module subclass which will handle the call to $method. Example: array('I2CE_Template->setForm'=>'setForm') You also have the option of array('I2CE_Template->setForm'=>array('method'=>'setForm','priority'=>100) If you wish to set a priority. The default proiority is the priority of the module
getConfig()
Get the configuration data for this module
- Defined in i2ce/lib/I2CE_Module.php on line 107
- Signature: public function getConfig()
- Returns: I2CE_MagicDataNode
getHooks()
Method called to get the modules' hooks
- Defined in i2ce/lib/I2CE_Module.php on line 151
- Signature: static public function getHooks()
- Returns: an
associative array where the key is the hookname and the value is mixed. The first option for the value is that it is a string. This string is the method name to call. The priority for the method in this case is the priority of the module
The second options is is that each value consists of an array with keys integers, the priority, and values the methods
Example we may return: array('post_configure'=>'andNowForSomethingCompletelyDifferent', 'post_junk'=>array( -10=>'method0' 10=>'method1' 100=>'method2' 1004=>'method3' ) )
Each of the methods takes either 0 or 1 argument depending on the hook. For a complete list of hooks and their arguments see....
getMethods()
Any 'fuzzy' methods that this module implements.
- Defined in i2ce/lib/I2CE_Module.php on line 197
- Signature: static public function getMethods()
- Returns: an
associative array. the keys are the form of $key = '$class::$method' where $class is the name of a class which is an instance of I2CE_FuzzyMethod and $method is the name of a $method we wish to add to the class $class and which is not already in the class. the value is the name of a public function in the I2CE_Module subclass which will handle the call to $method. Example: array('I2CE_Template->setForm'=>'setForm') You also have the option of array('I2CE_Template->setForm'=>array('method'=>'setForm','priority'=>100) If you wish to set a priority. The default proiority is the priority of the module
post_update()
Post Update this module if necessary
- Defined in i2ce/lib/I2CE_Module.php on line 60
- Signature: public function post_update($old_vers,$new_vers)
- Parameters:
- Returns: boolean
pre_upgrade()
Run the pre upgrade for this module. This can use the old config data before it has been changed from the config.
- Defined in i2ce/lib/I2CE_Module.php on line 98
- Signature: public function pre_upgrade($old_vers,$new_vers,$new_storage)
- Parameters:
- string $old_vers
- string $new_vers
- I2CE_MagicDataNode $new_storage
- Returns: boolean
requirement_external()
Checks to see if a an external requirement is avaialable
- Defined in i2ce/lib/I2CE_Module.php on line 71
- Signature: public function requirement_external($ext,$req_data)
- Parameters:
- Returns: boolean
true if the external reuqirement is available
upgrade()
Upgrade this module if necessary
- Defined in i2ce/lib/I2CE_Module.php on line 50
- Signature: public function upgrade($old_vers,$new_vers)
- Parameters:
- Returns: boolean
Inherited Methods
_hasMethod()
This public method is inherited from I2CE_Fuzzy->_hasMethod()
Inherited Fuzzy Methods
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()
Fuzzy Methods
launchBackgroundProcess()
This method is implemented by I2CE_BackgroundProcess->launchBackgroundProcess()
launchBackgroundPHPScript()
This method is implemented by I2CE_BackgroundProcess->launchBackgroundPHPScript()
launchBackgroundPage()
This method is implemented by I2CE_BackgroundProcess->launchBackgroundPage()