Hooks system: Difference between revisions

no edit summary
No edit summary
Line 16: Line 16:


<source lang="php">
<source lang="php">
$this->const = array(  
$this->const = array( 0=>array('MAIN_MODULE_YOURMODULENAME_HOOKS', 'chaine', 'productcard:invoicecard:propalcard', 'Hooks list for managing printing functions of the CustomFields module', 0);
                    0=>array('MAIN_MODULE_YOURMODULENAME_HOOKS', 'chaine', 'productcard:invoicecard:propalcard', 'Hooks list for managing printing functions of the CustomFields module', 0;  
</source>
</source>


Line 30: Line 29:
<source lang="php">
<source lang="php">
/**
/**
  * Function called when module is disabled.
  * Function called when module is disabled.
  *             Remove from database constants, boxes and permissions from Dolibarr database.
  * Remove from database constants, boxes and permissions from Dolibarr database.
  * Data directories are not deleted.
  * Data directories are not deleted.
  *     @return    int            1 if OK, 0 if KO
  * @return    int            1 if OK, 0 if KO
  */
  */
function remove()
function remove()
Line 47: Line 46:


<source lang="php">
<source lang="php">
/**
*      \class      actions_yourmodulename
*      \brief      Example hook file
*/
class ActionsYourModuleName // extends CommonObject  
class ActionsYourModuleName // extends CommonObject  
{  
{