Debug new modules

This commit is contained in:
Laurent Destailleur
2018-11-05 16:38:07 +01:00
parent d65bf1fbc7
commit 52d4426e87
13 changed files with 1136 additions and 24 deletions

View File

@@ -63,7 +63,7 @@ class modMyModule extends DolibarrModules
// Module description, used if translation string 'ModuleMyModuleDesc' not found (MyModule is name of module).
$this->description = "MyModuleDescription";
// Used only if file README.md and README-LL.md not found.
$this->descriptionlong = "MyModuleDescription (Long)";
$this->descriptionlong = "MyModule description (Long)";
$this->editor_name = 'Editor name';
$this->editor_url = 'https://www.example.com';
@@ -80,10 +80,7 @@ class modMyModule extends DolibarrModules
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
$this->picto='generic';
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
// for default path (eg: /mymodule/core/xxxxx) (0=disable, 1=enable)
// for specific path of parts (eg: /mymodule/core/modules/barcode)
// for specific css file (eg: /mymodule/css/mymodule.css.php)
// Define some features supported by module (triggers, login, substitutions, menus, css, etc...)
$this->module_parts = array(
'triggers' => 1, // 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 file (core/login)
@@ -108,14 +105,14 @@ class modMyModule extends DolibarrModules
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled. array('always1'=>'modModule1','always2'=>'modModule2', 'FR1'=>'modModuleFR'...)
$this->requiredby = array(); // List of module class names to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled. Example: array('always1'=>'modModuleToEnable1','always2'=>'modModuleToEnable2', 'FR1'=>'modModuleToEnableFR'...)
$this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
$this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
$this->langfiles = array("mymodule@mymodule");
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(4,0); // Minimum version of Dolibarr required by module
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
//$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(4,0); // Minimum version of Dolibarr required by module
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
//$this->automatic_activation = array('FR'=>'MyModuleWasAutomaticallyActivatedBecauseOfYourCountryChoice');
//$this->always_enabled = true; // If true, can't be disabled