29include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
52 $this->rights_class =
'datapolicy';
56 $this->family =
"technic";
58 $this->module_position =
'78';
62 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
64 $this->
description =
"Module to manage Data policy (for compliance with GDPR in Europe or other Data policy rules)";
66 $this->descriptionlong =
"";
69 $this->version =
'dolibarr';
71 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
75 $this->picto =
'lock';
81 $this->module_parts = array();
85 $this->dirs = array(
"/datapolicy/temp");
88 $this->config_page_url = array(
"setup.php@datapolicy");
91 $this->hidden =
false;
92 $this->depends = array(
'always' =>
'modCron');
93 $this->requiredby = array();
94 $this->conflictwith = array();
95 $this->langfiles = array(
"datapolicy");
96 $this->warnings_activation = array();
97 $this->warnings_activation_ext = array();
104 $this->
const = array(
105 array(
'DATAPOLICY_TIERS_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
106 array(
'DATAPOLICY_TIERS_PROSPECT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
107 array(
'DATAPOLICY_TIERS_PROSPECT_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
108 array(
'DATAPOLICY_TIERS_NIPROSPECT_NICLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
109 array(
'DATAPOLICY_TIERS_FOURNISSEUR',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
110 array(
'DATAPOLICY_CONTACT_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
111 array(
'DATAPOLICY_CONTACT_PROSPECT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
112 array(
'DATAPOLICY_CONTACT_PROSPECT_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
113 array(
'DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
114 array(
'DATAPOLICY_CONTACT_FOURNISSEUR',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
115 array(
'DATAPOLICY_ADHERENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
116 array(
'DATAPOLICY_RECRUITMENT_CANDIDATURE',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
121 $conf->datapolicy->enabled = 0;
126 $this->tabs = array();
155 $this->dictionaries = array();
160 $this->boxes = array();
165 $this->cronjobs = array(
166 0 => array(
'label' =>
'DATAPOLICYJob',
'jobtype' =>
'method',
'class' =>
'datapolicy/class/datapolicycron.class.php',
'objectname' =>
'DataPolicyCron',
'method' =>
'cleanDataForDataPolicy',
'parameters' =>
'',
'comment' =>
'Clean data',
'frequency' => 1,
'unitfrequency' => 86400,
'status' => 1,
'test' =>
'isModEnabled("datapolicy")'),
173 $this->rights = array();
176 $this->menu = array();
187 public function init($options =
'')
220 return $this->
_init($sql, $options);
231 public function remove($options =
'')
235 return $this->
_remove($sql, $options);
_init($array_sql, $options='')
Enables a module.
_remove($array_sql, $options='')
Disable function.
Description and activation class for module datapolicy.
__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.
isModEnabled($module)
Is Dolibarr module enabled.
$conf db name
Only used if Module[ID]Name translation string is not found.