dolibarr  7.0.0-beta
modModuleBuilder.class.php
1 <?php
2 /* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourcefore.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
25 include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
26 
31 {
37  function __construct($db)
38  {
39  global $langs,$conf;
40 
41  $this->db = $db;
42  $this->numero = 3300;
43 
44  // Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
45  // It is used to group modules in module setup page
46  $this->family = "technic";
47  // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
48  $this->name = preg_replace('/^mod/i','',get_class($this));
49  $this->description = "A RAD (Rapid Application Development) tool to help developers to build their own module.";
50  // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
51  $this->version = 'experimental';
52  // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
53  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
54  // Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
55  $this->special = 1;
56  // Name of image file used for this module.
57  $this->picto='technic';
58 
59  // Data directories to create when module is enabled
60  $this->dirs = array();
61 
62  // Config pages
63  //-------------
64  $this->config_page_url = array();
65 
66  // Dependancies
67  //-------------
68  $this->hidden = false; // A condition to disable module
69  $this->depends = array(); // List of modules id that must be enabled if this module is enabled
70  $this->requiredby = array(); // List of modules id to disable if this one is disabled
71  $this->conflictwith = array(); // List of modules id this module is in conflict with
72  $this->langfiles = array();
73 
74  // Constants
75  //-----------
76 
77 
78  // New pages on tabs
79  // -----------------
80  $this->tabs = array();
81 
82  // Boxes
83  //------
84  $this->boxes = array();
85 
86  // Main menu entries
87  //------------------
88  $this->menu = array();
89 
90  $this->menu[$r]=array('fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools',
91  'type'=>'left',
92  'titre'=>'ModuleBuilder',
93  'mainmenu'=>'home',
94  'leftmenu'=>'admintools_modulebuilder',
95  'url'=>'/modulebuilder/index.php?mainmenu=home&amp;leftmenu=admintools',
96  'langs'=>'modulebuilder',
97  'position'=>100,
98  'perms'=>'1',
99  'enabled'=>'$conf->modulebuilder->enabled && preg_match(\'/^admintools/\',$leftmenu) && ($user->admin || $conf->global->MODULEBUILDER_FOREVERYONE)',
100  'target'=>'_modulebuilder',
101  'user'=>0);
102 
103  }
104 }
Class DolibarrModules.
</td >< tdclass="liste_titre"align="right"></td ></tr >< trclass="liste_titre">< inputtype="checkbox"onClick="toggle(this)"/> Ref p ref Label p label Duration p duration warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow img yes disabled img no img no< trclass="oddeven">< td >< inputtype="checkbox"class="check"name="'.$i.'"'.$disabled.'></td >< td >< inputtype="checkbox"class="check"name="choose'.$i.'"></td >< tdclass="nowrap"></td >< td >< inputtype="hidden"name="desc'.$i.'"value="'.dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Definition: replenish.php:554
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:104
Class to describe a ModuleBuilder module.
__construct($db)
Constructor.