dolibarr  9.0.0
modLabel.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2007-2009 Regis Houssin <regis.houssin@inodbox.com>
3  * Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
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 
27 include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
28 
29 
34 {
35 
41  function __construct($db)
42  {
43  $this->db = $db;
44  $this->numero = 60;
45 
46  $this->family = "technic";
47  $this->module_position = '75';
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 = "Gestion des etiquettes";
51  // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
52  $this->version = 'development';
53  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
54  $this->picto='label';
55 
56  // Data directories to create when module is enabled
57  $this->dirs = array("/label/temp");
58 
59  // Dependencies
60  $this->hidden = false; // A condition to hide module
61  $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
62  $this->requiredby = array(); // List of module ids to disable if this one is disabled
63  $this->conflictwith = array(); // List of module class names as string this module is in conflict with
64  $this->phpmin = array(5,4); // Minimum version of PHP required by module
65 
66  // Config pages
67  // $this->config_page_url = array("label.php");
68 
69  // Constants
70  $this->const = array();
71 
72  // Boxes
73  $this->boxes = array();
74 
75  // Permissions
76  $this->rights = array();
77  $this->rights_class = 'label';
78 
79  $this->rights[1][0] = 601; // id de la permission
80  $this->rights[1][1] = 'Lire les etiquettes'; // libelle de la permission
81  $this->rights[1][3] = 1; // La permission est-elle une permission par defaut
82  $this->rights[1][4] = 'lire';
83 
84  $this->rights[2][0] = 602; // id de la permission
85  $this->rights[2][1] = 'Creer/modifier les etiquettes'; // libelle de la permission
86  $this->rights[2][3] = 0; // La permission est-elle une permission par defaut
87  $this->rights[2][4] = 'creer';
88 
89  $this->rights[4][0] = 609; // id de la permission
90  $this->rights[4][1] = 'Supprimer les etiquettes'; // libelle de la permission
91  $this->rights[4][3] = 0; // La permission est-elle une permission par defaut
92  $this->rights[4][4] = 'supprimer';
93  }
94 
103  function init($options='')
104  {
105  // Permissions
106  $this->remove($options);
107 
108  $sql = array();
109 
110  return $this->_init($sql,$options);
111  }
112 }
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
init($options='')
Function called when module is enabled.
_init($array_sql, $options='')
Enables a module.
Class to describe and enable module Label.
__construct($db)
Constructor.