InformationSet

Navigation:  Components > Hook >

InformationSet

Previous pageReturn to chapter overviewNext page

This Hook  used to register informationSet.
 
Step1: Register Call call back. See below format:
 
App::Module('Hook')

   ->setHookName("InformationSet")

   ->setAction("register_definition")

   ->Register(Call Back Class Name, Call Back Function Name);

 

Name

Type

Description

Call Back Class Name

Mandatory

Class Name of  call back function

Call Back Function Name

Mandatory

Call back function

 

Step 2: Register resource in Call back function:

In call back function we return an array with InformationSet information like below
 

$srcpaths[] = array(

   'type'=>Name,

   "'path"=>Path

);
 
 

Name

Type

Description

Name

Mandatory

Name of the InformationSet

Path

Mandatory

CategorySet file path

 

See below example:
 
class Component_Appstore_Register extends appRain_Base_Component
{
   public function init(){
       App::Module('Hook')
           ->setHookName('InformationSet')
           ->setAction("register_definition")
           ->Register(get_class($this),"register_informationset_defination");
 
   }
 
   public function register_helper()
   {
       $srcpaths = Array();
       $srcpaths[] =   array(
          'type'=>'blogpost',
          'path'=>$this->attachMyPath('information_set/blogpost.xml')
       );
      return $srcpaths;
   }
}