Class: I2CE Module (4.0.4)

From IHRIS Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


This article describes the abstract class I2CE_Module .

The abstract class for that all modules must implement

Methods

__construct()

Construct this object

action_configure()

Method called to perform the configuration for this module All the configuration should take place within the div with id 'moduleConfiguration'

action_disable()

Perform any actions that a module needs to when it is disabled.

  • Defined in i2ce/lib/I2CE_Module.php on line 219
  • 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 209
  • 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.

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 154
  • 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 197
  • 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

getHooks()

Method called to get the modules' hooks

  • Defined in i2ce/lib/I2CE_Module.php on line 128
  • 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 174
  • 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

pre_upgrade()

Run the pre upgrade for this module. This can use the old config data before it has been changed from the config.

upgrade()

Upgrade this module if necessary

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()