dolibarr 19.0.3
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 <https://www.gnu.org/licenses/>.
17 */
18
27include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
28
29
34{
40 public function __construct($db)
41 {
42 $this->db = $db;
43 $this->numero = 60;
44
45 $this->family = "technic";
46 $this->module_position = '75';
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 = "Management of stickers";
50 // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
51 $this->version = 'development';
52 $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
53 $this->picto = 'generic';
54
55 // Data directories to create when module is enabled
56 $this->dirs = array("/label/temp");
57
58 // Dependencies
59 $this->hidden = false; // A condition to hide module
60 $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
61 $this->requiredby = array(); // List of module ids to disable if this one is disabled
62 $this->conflictwith = array(); // List of module class names as string this module is in conflict with
63 $this->phpmin = array(7, 0); // Minimum version of PHP required by module
64
65 // Config pages
66 // $this->config_page_url = array("label.php");
67
68 // Constants
69 $this->const = array();
70
71 // Boxes
72 $this->boxes = array();
73
74 // Permissions
75 $this->rights = array();
76 $this->rights_class = 'label';
77
78 $this->rights[1][0] = 601; // id de la permission
79 $this->rights[1][1] = 'Read stickers';
80 $this->rights[1][3] = 0; // La permission est-elle une permission par defaut
81 $this->rights[1][4] = 'lire';
82
83 $this->rights[2][0] = 602; // id de la permission
84 $this->rights[2][1] = 'Create/modify stickers';
85 $this->rights[2][3] = 0; // La permission est-elle une permission par defaut
86 $this->rights[2][4] = 'creer';
87
88 $this->rights[4][0] = 609; // id de la permission
89 $this->rights[4][1] = 'Delete stickers';
90 $this->rights[4][3] = 0; // La permission est-elle une permission par defaut
91 $this->rights[4][4] = 'supprimer';
92 }
93
102 public function init($options = '')
103 {
104 // Permissions
105 $this->remove($options);
106
107 $sql = array();
108
109 return $this->_init($sql, $options);
110 }
111}
Class DolibarrModules.
_init($array_sql, $options='')
Enables a module.
Class to describe and enable module Label.
__construct($db)
Constructor.
init($options='')
Function called when module is enabled.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:124