Fix: Overwritting code is not role of a template but of a module.

Code is now working as a module change. Also it is faster (no need to
make a failed include when module is not installed) and support
alternative directory.
This commit is contained in:
Laurent Destailleur
2012-04-28 17:01:25 +02:00
parent a862b5d5c3
commit ff06360071
11 changed files with 57 additions and 62 deletions

View File

@@ -73,12 +73,13 @@ class modMyModule extends DolibarrModules
// for specific path of parts (eg: /mymodule/core/modules/barcode)
// for specific css file (eg: /mymodule/css/mymodule.css.php)
//$this->module_parts = array(
// 'triggers' => 0, // Set this to 1 if module has its own trigger directory
// 'login' => 0, // Set this to 1 if module has its own login method directory
// 'substitutions' => 0, // Set this to 1 if module has its own substitution function file
// 'menus' => 0, // Set this to 1 if module has its own menus handler directory
// 'barcode' => 0, // Set this to 1 if module has its own barcode directory
// 'models' => 0, // Set this to 1 if module has its own models directory
// 'triggers' => 0, // Set this to 1 if module has its own trigger directory (core/triggers)
// 'login' => 0, // Set this to 1 if module has its own login method directory (core/login)
// 'substitutions' => 0, // Set this to 1 if module has its own substitution function file (core/substitutions)
// 'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus)
// 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl)
// 'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode)
// 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
// 'css' => '/mymodule/css/mymodule.css.php', // Set this to relative path of css if module has its own css file
// 'hooks' => array('hookcontext1','hookcontext2') // Set here all hooks context managed by module
// 'workflow' => array('order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE')) // Set here all workflow context managed by module