28 include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
56 $this->rights_class =
'datapolicy';
60 $this->family =
"technic";
62 $this->module_position =
'78';
66 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
68 $this->
description =
"Module to manage Data policy (for compliance with GDPR in Europe or other Data policy rules)";
70 $this->descriptionlong =
"";
73 $this->version =
'experimental';
75 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
79 $this->picto =
'generic';
85 $this->module_parts = array(
94 'hooks' => array(
'data' => array(
'membercard',
'contactcard',
'thirdpartycard'),
'entity' => $conf->entity)
99 $this->dirs = array(
"/datapolicy/temp");
102 $this->config_page_url = array(
"setup.php@datapolicy");
105 $this->hidden =
false;
106 $this->depends = array(
'always'=>
'modCron');
107 $this->requiredby = array();
108 $this->conflictwith = array();
109 $this->langfiles = array(
"datapolicy@datapolicy");
110 $this->phpmin = array(5, 3);
111 $this->need_dolibarr_version = array(4, 0);
112 $this->warnings_activation = array();
113 $this->warnings_activation_ext = array();
121 $this->
const = array(
122 array(
'DATAPOLICY_TIERS_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
123 array(
'DATAPOLICY_TIERS_PROSPECT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
124 array(
'DATAPOLICY_TIERS_PROSPECT_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
125 array(
'DATAPOLICY_TIERS_NIPROSPECT_NICLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
126 array(
'DATAPOLICY_TIERS_FOURNISSEUR',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
127 array(
'DATAPOLICY_CONTACT_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
128 array(
'DATAPOLICY_CONTACT_PROSPECT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
129 array(
'DATAPOLICY_CONTACT_PROSPECT_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
130 array(
'DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
131 array(
'DATAPOLICY_CONTACT_FOURNISSEUR',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
132 array(
'DATAPOLICY_ADHERENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
135 $country = explode(
":", empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY) ?
'' : $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
143 if (!isset($conf->datapolicy) || !isset($conf->datapolicy->enabled)) {
144 $conf->datapolicy =
new stdClass();
145 $conf->datapolicy->enabled = 0;
150 $this->tabs = array();
179 $this->dictionaries = array();
184 $this->boxes = array();
189 $this->cronjobs = array(
190 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' =>
'$conf->datapolicy->enabled'),
196 $this->rights = array();
198 $this->menu = array();
210 public function init($options =
'')
215 include_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
243 return $this->
_init($sql, $options);
254 public function remove($options =
'')
258 return $this->
_remove($sql, $options);