Merge pull request #24203 from frederic34/moduledoc

add doc
This commit is contained in:
Laurent Destailleur 2023-03-17 19:11:20 +01:00 committed by GitHub
commit b8c169ac18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

View File

@ -248,10 +248,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
public $export_icon; public $export_icon;
/**
* @var array export enabled
*/
public $export_enabled;
public $export_permission; public $export_permission;
public $export_fields_array; public $export_fields_array;
public $export_TypeFields_array; // Array of key=>type where type can be 'Numeric', 'Date', 'Text', 'Boolean', 'Status', 'List:xxx:login:rowid' public $export_TypeFields_array; // Array of key=>type where type can be 'Numeric', 'Date', 'Text', 'Boolean', 'Status', 'List:xxx:login:rowid'
public $export_entities_array; public $export_entities_array;
public $export_examplevalues_array;
public $export_help_array; public $export_help_array;
public $export_special_array; // special or computed field public $export_special_array; // special or computed field
public $export_dependencies_array; public $export_dependencies_array;
@ -273,9 +278,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
public $import_label; public $import_label;
public $import_icon; public $import_icon;
public $import_entities_array; public $import_entities_array;
public $import_tables_array; public $import_tables_array;
public $import_tables_creator_array;
public $import_fields_array; public $import_fields_array;
public $import_fieldshidden_array; public $import_fieldshidden_array;
public $import_convertvalue_array; public $import_convertvalue_array;

View File

@ -142,16 +142,16 @@ class modCategorie extends DolibarrModules
if (isModEnabled("societe")) { if (isModEnabled("societe")) {
$typeexample .= ($typeexample ? " / " : "")."4=Contact"; $typeexample .= ($typeexample ? " / " : "")."4=Contact";
} }
if (!empty($conf->bank->enabled)) { if (isModEnabled('bank')) {
$typeexample .= ($typeexample ? " / " : "")."5=Bank account"; $typeexample .= ($typeexample ? " / " : "")."5=Bank account";
} }
if (isModEnabled('project')) { if (isModEnabled('project')) {
$typeexample .= ($typeexample ? " / " : "")."6=Project"; $typeexample .= ($typeexample ? " / " : "")."6=Project";
} }
if (!empty($conf->user->enabled)) { if (isModEnabled('user')) {
$typeexample .= ($typeexample ? " / " : "")."7=User"; $typeexample .= ($typeexample ? " / " : "")."7=User";
} }
if (!empty($conf->bank->enabled)) { if (isModEnabled('bank')) {
$typeexample .= ($typeexample ? " / " : "")."8=Bank line"; $typeexample .= ($typeexample ? " / " : "")."8=Bank line";
} }
if (isModEnabled('stock')) { if (isModEnabled('stock')) {
@ -411,7 +411,7 @@ class modCategorie extends DolibarrModules
$this->export_code[$r] = $this->rights_class.'_7_'.Categorie::$MAP_ID_TO_CODE[7]; $this->export_code[$r] = $this->rights_class.'_7_'.Categorie::$MAP_ID_TO_CODE[7];
$this->export_label[$r] = 'CatUsersList'; $this->export_label[$r] = 'CatUsersList';
$this->export_icon[$r] = $this->picto; $this->export_icon[$r] = $this->picto;
$this->export_enabled[$r] = '!empty($conf->user->enabled)'; $this->export_enabled[$r] = 'isModEnabled("user")';
$this->export_permission[$r] = array(array("categorie", "lire"), array("user", "export")); $this->export_permission[$r] = array(array("categorie", "lire"), array("user", "export"));
$this->export_fields_array[$r] = array('cat.rowid'=>"CategId", 'cat.label'=>"Label", 'cat.description'=>"Description", 'cat.fk_parent'=>"ParentCategory", 'pcat.label'=>"ParentCategoryLabel", 'p.rowid'=>'UserID', 'p.login'=>'Login', 'p.lastname'=>'Lastname', 'p.firstname'=>'Firstname'); $this->export_fields_array[$r] = array('cat.rowid'=>"CategId", 'cat.label'=>"Label", 'cat.description'=>"Description", 'cat.fk_parent'=>"ParentCategory", 'pcat.label'=>"ParentCategoryLabel", 'p.rowid'=>'UserID', 'p.login'=>'Login', 'p.lastname'=>'Lastname', 'p.firstname'=>'Firstname');
$this->export_TypeFields_array[$r] = array('cat.rowid'=>"Numeric", 'cat.label'=>"Text", 'cat.description'=>"Text", 'cat.fk_parent'=>'Numeric', 'pcat.label'=>'Text', 'p.rowid'=>'Numeric', 'p.login'=>'Text', 'p.lastname'=>'Text', 'p.firstname'=>'Text'); $this->export_TypeFields_array[$r] = array('cat.rowid'=>"Numeric", 'cat.label'=>"Text", 'cat.description'=>"Text", 'cat.fk_parent'=>'Numeric', 'pcat.label'=>'Text', 'p.rowid'=>'Numeric', 'p.login'=>'Text', 'p.lastname'=>'Text', 'p.firstname'=>'Text');
@ -594,7 +594,7 @@ class modCategorie extends DolibarrModules
} }
// 7 Users // 7 Users
if (!empty($conf->user->enabled)) { if (isModEnabled('user')) {
$r++; $r++;
$this->import_code[$r] = $this->rights_class.'_7_'.Categorie::$MAP_ID_TO_CODE[7]; $this->import_code[$r] = $this->rights_class.'_7_'.Categorie::$MAP_ID_TO_CODE[7];
$this->import_label[$r] = "CatUsersLinks"; // Translation key $this->import_label[$r] = "CatUsersLinks"; // Translation key