init_on_install

Navigation:  Components > Basic Structure > Register Events >

init_on_install

Previous pageReturn to chapter overviewNext page

This method runs each time we activate the component. See below example:
 
class Component_ComponentName_Register extends appRain_Base_Component
{
   public init_on_install init()
   {
   }
}

 

Generally in this method we do all operation like environment check, related database table creation, Page Creation etc. See below example that register first admin tab:
 
class Component_Appstore_Register extends appRain_Base_Component
{
   public function init_on_install()
   {
      # Register Admin TAB
      $this->autoRegisterAdminTopNav('catalog');
   }
}