Added missing properties in modules class.
Enhanced modules class documentation.
This commit is contained in:
parent
4126928804
commit
f97f011cd3
@ -105,9 +105,9 @@ class modMyModule extends DolibarrModules
|
|||||||
|
|
||||||
// Dependencies
|
// Dependencies
|
||||||
$this->hidden = false; // A condition to hide module
|
$this->hidden = false; // A condition to hide module
|
||||||
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
|
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
|
||||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||||
$this->conflictwith = array(); // List of modules id this module is in conflict with
|
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||||
$this->phpmin = array(5,0); // Minimum version of PHP required by module
|
$this->phpmin = array(5,0); // Minimum version of PHP required by module
|
||||||
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
|
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
|
||||||
$this->langfiles = array("mylangfile@mymodule");
|
$this->langfiles = array("mylangfile@mymodule");
|
||||||
|
|||||||
@ -41,36 +41,47 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Module unique ID
|
* @var int Module unique ID
|
||||||
|
* @see https://wiki.dolibarr.org/index.php/List_of_modules_id
|
||||||
*/
|
*/
|
||||||
public $numero;
|
public $numero;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Publisher name
|
* @var string Publisher name
|
||||||
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public $editor_name;
|
public $editor_name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string URL of module at publisher site
|
* @var string URL of module at publisher site
|
||||||
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public $editor_url;
|
public $editor_url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Family
|
* @var 'crm'|'financial'|'hr'|'projects'|'products'|'ecm'|'technic'|'other' Family
|
||||||
*/
|
*/
|
||||||
public $family;
|
public $family;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int module_position
|
* @var int Module position
|
||||||
|
* @since 3.9.0
|
||||||
*/
|
*/
|
||||||
public $module_position=500;
|
public $module_position=500;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Module name
|
* @var string Module name
|
||||||
|
*
|
||||||
|
* Only used if Module[ID]Name translation string is not found.
|
||||||
|
*
|
||||||
|
* You can use the following code to automatically derive it from your module's class name:
|
||||||
|
* preg_replace('/^mod/i', '', get_class($this))
|
||||||
*/
|
*/
|
||||||
public $name;
|
public $name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array Paths to create when module is activated
|
* @var string[] Paths to create when module is activated
|
||||||
|
*
|
||||||
|
* e.g.: array('/mymodule/temp')
|
||||||
*/
|
*/
|
||||||
public $dirs = array();
|
public $dirs = array();
|
||||||
|
|
||||||
@ -159,16 +170,29 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Module version
|
* @var string Module version
|
||||||
|
* @see http://semver.org
|
||||||
|
*
|
||||||
|
* The following keywords can also be used:
|
||||||
|
* 'development'
|
||||||
|
* 'experimental'
|
||||||
|
* 'dolibarr': only for core modules that share its version
|
||||||
|
* 'dolibarr_deprecated': only for deprecated core modules
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public $version;
|
public $version;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Module description (short text)
|
* @var string Module description (short text)
|
||||||
|
*
|
||||||
|
* Only used if Module[ID]Desc translation string is not found.
|
||||||
*/
|
*/
|
||||||
public $description;
|
public $description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Module description (long text)
|
* @var string Module description (long text)
|
||||||
|
* @since 4.0.0
|
||||||
|
*
|
||||||
|
* HTML content supported.
|
||||||
*/
|
*/
|
||||||
public $descriptionlong;
|
public $descriptionlong;
|
||||||
|
|
||||||
@ -219,7 +243,66 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
|||||||
*/
|
*/
|
||||||
public $style_sheet = '';
|
public $style_sheet = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var 0|1|2|3 Where to display the module in setup page
|
||||||
|
*
|
||||||
|
* 0: common
|
||||||
|
* 1: interface
|
||||||
|
* 2: others
|
||||||
|
* 3: very specific
|
||||||
|
*/
|
||||||
|
public $special;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Name of image file used for this module
|
||||||
|
*
|
||||||
|
* If file is in theme/yourtheme/img directory under name object_pictoname.png use 'pictoname'
|
||||||
|
* If file is in module/img directory under name object_pictoname.png use 'pictoname@module'
|
||||||
|
*/
|
||||||
|
public $picto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[] List of config pages
|
||||||
|
*
|
||||||
|
* Name of php pages stored into module/admin directory, used to setup module.
|
||||||
|
* e.g.: "admin.php@module"
|
||||||
|
*/
|
||||||
|
public $config_page_url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[] List of module class names that must be enabled if this module is enabled.
|
||||||
|
*
|
||||||
|
* e.g.: array('modAnotherModule', 'modYetAnotherModule')
|
||||||
|
*/
|
||||||
|
public $depends;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int[] List of module ids to disable if this one is disabled.
|
||||||
|
*/
|
||||||
|
public $requiredby;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[] List of module class names as string this module is in conflict with.
|
||||||
|
* @see depends
|
||||||
|
*/
|
||||||
|
public $conflictwith;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array() Minimum version of PHP required by module.
|
||||||
|
* e.g.: PHP ≥ 5.3 = array(5, 3)
|
||||||
|
*/
|
||||||
|
public $phpmin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Minimum version of Dolibarr required by module.
|
||||||
|
* e.g.: Dolibarr ≥ 3.6 = array(3, 6)
|
||||||
|
*/
|
||||||
|
public $need_dolibarr_version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool Whether to hide the module.
|
||||||
|
*/
|
||||||
|
public $hidden = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor. Define names, constants, directories, boxes, permissions
|
* Constructor. Define names, constants, directories, boxes, permissions
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user