dolibarr
19.0.0-dev
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
dolibarr_dev
htdocs
debugbar
class
DebugBar.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.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 <https://www.gnu.org/licenses/>.
16
*/
17
24
dol_include_once
(
'/debugbar/class/autoloader.php'
);
25
26
use DebugBar\DebugBar;
27
28
dol_include_once
(
'/debugbar/class/DataCollector/DolMessagesCollector.php'
);
29
dol_include_once
(
'/debugbar/class/DataCollector/DolRequestDataCollector.php'
);
30
dol_include_once
(
'/debugbar/class/DataCollector/DolConfigCollector.php'
);
31
dol_include_once
(
'/debugbar/class/DataCollector/DolTimeDataCollector.php'
);
32
dol_include_once
(
'/debugbar/class/DataCollector/DolMemoryCollector.php'
);
33
dol_include_once
(
'/debugbar/class/DataCollector/DolPhpCollector.php'
);
34
dol_include_once
(
'/debugbar/class/DataCollector/DolExceptionsCollector.php'
);
35
dol_include_once
(
'/debugbar/class/DataCollector/DolQueryCollector.php'
);
36
dol_include_once
(
'/debugbar/class/DataCollector/DolibarrCollector.php'
);
37
dol_include_once
(
'/debugbar/class/DataCollector/DolLogsCollector.php'
);
38
45
class
DolibarrDebugBar
extends
DebugBar
46
{
51
public
function
__construct
()
52
{
53
global $conf;
54
55
//$this->addCollector(new PhpInfoCollector());
56
//$this->addCollector(new DolMessagesCollector());
57
$this->addCollector(
new
DolRequestDataCollector
());
58
//$this->addCollector(new DolConfigCollector()); // Disabled for security purpose
59
$this->addCollector(
new
DolTimeDataCollector
());
60
$this->addCollector(
new
PhpCollector
());
61
$this->addCollector(
new
DolMemoryCollector
());
62
//$this->addCollector(new DolExceptionsCollector());
63
$this->addCollector(
new
DolQueryCollector
());
64
$this->addCollector(
new
DolibarrCollector
());
65
if
(
isModEnabled
(
'syslog'
)) {
66
$this->addCollector(
new
DolLogsCollector
());
67
}
68
}
69
75
public
function
getRenderer
()
76
{
77
$renderer = parent::getJavascriptRenderer(DOL_URL_ROOT.
'/includes/maximebf/debugbar/src/DebugBar/Resources'
);
78
$renderer->disableVendor(
'jquery'
);
// We already have jquery loaded globally by the main.inc.php
79
$renderer->disableVendor(
'fontawesome'
);
// We already have fontawesome loaded globally by the main.inc.php
80
$renderer->disableVendor(
'highlightjs'
);
// We don't need this
81
$renderer->setEnableJqueryNoConflict(
false
);
// We don't need no conflict
82
83
return
$renderer;
84
}
85
}
DolTimeDataCollector
DolTimeDataCollector class.
Definition:
DolTimeDataCollector.php:29
dol_include_once
if(!function_exists('dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
Definition:
functions.lib.php:1129
DolibarrCollector
DolibarrCollector class.
Definition:
DolibarrCollector.php:33
DolibarrDebugBar\__construct
__construct()
Constructor.
Definition:
DebugBar.php:51
DolQueryCollector
DolQueryCollector class.
Definition:
DolQueryCollector.php:34
DolibarrDebugBar\getRenderer
getRenderer()
Returns a JavascriptRenderer for this instance.
Definition:
DebugBar.php:75
DolMemoryCollector
DolMemoryCollector class.
Definition:
DolMemoryCollector.php:29
isModEnabled
isModEnabled($module)
Is Dolibarr module enabled.
Definition:
functions.lib.php:207
PhpCollector
Class PhpCollector.
Definition:
DolPhpCollector.php:33
DolibarrDebugBar
DolibarrDebugBar class.
Definition:
DebugBar.php:45
DolLogsCollector
DolLogsCollector class.
Definition:
DolLogsCollector.php:33
DolRequestDataCollector
DolRequestDataCollector class.
Definition:
DolRequestDataCollector.php:30
Generated on Fri Dec 1 2023 01:00:49 for
dolibarr
by Doxygen 1.8.17