dolibarr 18.0.6
modDebugBar.class.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2019-2020 AXeL-dev <contact.axel.dev@gmail.com>
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 <https://www.gnu.org/licenses/>.
16 */
17
26include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
27
28
33{
34
40 public function __construct($db)
41 {
42 $this->db = $db;
43
44 $this->numero = 43;
45
46 $this->rights_class = 'debugbar';
47
48 $this->family = "base";
49 $this->module_position = '75';
50
51 // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
52 $this->name = preg_replace('/^mod/i', '', get_class($this));
53 $this->description = "A tool for developper adding a debug bar in your browser.";
54 // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
55 $this->version = 'dolibarr';
56 $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
57 $this->picto = 'bug';
58
59 $this->module_parts = array('moduleforexternal' => 0);
60
61 // Data directories to create when module is enabled
62 $this->dirs = array();
63
64 // Dependencies
65 $this->depends = array(); // May be used for product or service or third party module
66 $this->requiredby = array();
67
68 // Config pages
69 $this->config_page_url = array("debugbar.php");
70
71 // Constants
72 // Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0),
73 // 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) );
74 $this->const = array();
75
76 // Boxes
77 $this->boxes = array();
78
79 // Permissions
80 $this->rights = array();
81
82 $this->rights[1][0] = 431; // id de la permission
83 $this->rights[1][1] = 'Use Debug Bar'; // libelle de la permission
84 $this->rights[1][2] = 'u'; // type de la permission (deprecie a ce jour)
85 $this->rights[1][3] = 1; // La permission est-elle une permission par defaut
86 $this->rights[1][4] = 'read';
87 }
88
89
98 public function init($options = '')
99 {
100 // Permissions
101 $this->remove($options);
102
103 $sql = array(
104 );
105
106 return $this->_init($sql, $options);
107 }
108}
Class DolibarrModules.
_init($array_sql, $options='')
Enables a module.
Class to describe and enable module.
init($options='')
Function called when module is enabled.
__construct($db)
Constructor.
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:123