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