|
1
|
|
|
<?php |
|
2
|
|
|
/* Copyright (C) 2013 Alexandre Spangaro <[email protected]> |
|
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 <http://www.gnu.org/licenses/>. |
|
16
|
|
|
*/ |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* \defgroup blockchainlog Module BlockChainLog |
|
20
|
|
|
* \brief Add a log into a block chain for some actions. |
|
21
|
|
|
* \file htdocs/core/modules/modBlockChainLog.class.php |
|
22
|
|
|
* \ingroup blockchainlog |
|
23
|
|
|
* \brief Description and activation file for module BlockChainLog |
|
24
|
|
|
*/ |
|
25
|
|
|
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* Class to describe a Cron module |
|
29
|
|
|
*/ |
|
30
|
|
|
class modBlockChainLog extends DolibarrModules |
|
31
|
|
|
{ |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* Constructor. Define names, constants, directories, boxes, permissions |
|
35
|
|
|
* |
|
36
|
|
|
* @param DoliDB $db Database handler |
|
37
|
|
|
*/ |
|
38
|
|
|
function __construct($db) |
|
39
|
|
|
{ |
|
40
|
|
|
global $langs,$conf; |
|
41
|
|
|
|
|
42
|
|
|
$this->db = $db; |
|
43
|
|
|
$this->numero = 3200; |
|
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 = "Enable a log of some business events into a non reversible block chain. This module may be mandatory for some countries."; |
|
51
|
|
|
$this->version = 'development'; // 'development', 'experimental' or 'dolibarr' or version |
|
52
|
|
|
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) |
|
53
|
|
|
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); |
|
54
|
|
|
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific) |
|
55
|
|
|
$this->special = 1; |
|
56
|
|
|
// Name of image file used for this module. |
|
57
|
|
|
$this->picto='skype'; |
|
58
|
|
|
|
|
59
|
|
|
// Data directories to create when module is enabled |
|
60
|
|
|
$this->dirs = array(); |
|
61
|
|
|
|
|
62
|
|
|
// Config pages |
|
63
|
|
|
//------------- |
|
64
|
|
|
$this->config_page_url = array(); |
|
65
|
|
|
|
|
66
|
|
|
// Dependancies |
|
67
|
|
|
//------------- |
|
68
|
|
|
$this->hidden = false; // A condition to disable module |
|
69
|
|
|
$this->depends = array('modFacture'); // List of modules id that must be enabled if this module is enabled |
|
70
|
|
|
$this->requiredby = array(); // List of modules id to disable if this one is disabled |
|
71
|
|
|
$this->conflictwith = array(); // List of modules id this module is in conflict with |
|
72
|
|
|
$this->langfiles = array(); |
|
73
|
|
|
|
|
74
|
|
|
// Constants |
|
75
|
|
|
//----------- |
|
76
|
|
|
|
|
77
|
|
|
|
|
78
|
|
|
// New pages on tabs |
|
79
|
|
|
// ----------------- |
|
80
|
|
|
$this->tabs = array(); |
|
81
|
|
|
|
|
82
|
|
|
// Boxes |
|
83
|
|
|
//------ |
|
84
|
|
|
$this->boxes = array(); |
|
85
|
|
|
|
|
86
|
|
|
// Main menu entries |
|
87
|
|
|
//------------------ |
|
88
|
|
|
$this->menu = array(); |
|
89
|
|
|
} |
|
90
|
|
|
} |
|
91
|
|
|
|