Register Events

Navigation:  Components > Basic Structure >

Register Events

Previous pageReturn to chapter overviewNext page

Each component has a class to register hooks and manage event. We save class in register.php. See below format
 
class Component_[Component Name]_Register extends appRain_Base_Component{
 
}
 

Parameter

Description

Component Name

Component Directory name considered as it's name.

 

 

Each component has following events: 

 

Name

Function

Description

init

init()

Component Directory name considered as it's name.

init_on_install

init_on_install()


init_on_uninstall

init_on_uninstall()


 

 

See below example:
 
class Component_Appstore_Register extends appRain_Base_Component
{
   public function init()
   {
   }

   public function init_on_install()
   {
   }
 
   public function init_on_uninstall()
   {
   }
}