55 $this->rights_class =
'datapolicy';
59 $this->family =
"technic";
61 $this->module_position =
'78';
65 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
67 $this->
description =
"Module to manage Data policy (for compliance with GDPR in Europe or other Data policy rules)";
69 $this->descriptionlong =
"";
72 $this->version =
'experimental';
74 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
78 $this->picto =
'generic';
84 $this->module_parts = array(
93 'hooks' => array(
'data' => array(
'membercard',
'contactcard',
'thirdpartycard'),
'entity' => $conf->entity)
98 $this->dirs = array(
"/datapolicy/temp");
101 $this->config_page_url = array(
"setup.php@datapolicy");
104 $this->hidden =
false;
105 $this->depends = array(
'always'=>
'modCron');
106 $this->requiredby = array();
107 $this->conflictwith = array();
108 $this->langfiles = array(
"datapolicy");
109 $this->phpmin = array(5, 3);
110 $this->need_dolibarr_version = array(7, 0);
111 $this->warnings_activation = array();
112 $this->warnings_activation_ext = array();
120 $this->
const = array(
121 array(
'DATAPOLICY_TIERS_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
122 array(
'DATAPOLICY_TIERS_PROSPECT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
123 array(
'DATAPOLICY_TIERS_PROSPECT_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
124 array(
'DATAPOLICY_TIERS_NIPROSPECT_NICLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
125 array(
'DATAPOLICY_TIERS_FOURNISSEUR',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
126 array(
'DATAPOLICY_CONTACT_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
127 array(
'DATAPOLICY_CONTACT_PROSPECT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
128 array(
'DATAPOLICY_CONTACT_PROSPECT_CLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
129 array(
'DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
130 array(
'DATAPOLICY_CONTACT_FOURNISSEUR',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
131 array(
'DATAPOLICY_ADHERENT',
'chaine',
'', $langs->trans(
'NUMBER_MONTH_BEFORE_DELETION'), 0),
134 $country = explode(
":", empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY) ?
'' : $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
142 if (!isset($conf->datapolicy) || !isset($conf->datapolicy->enabled)) {
143 $conf->datapolicy =
new stdClass();
144 $conf->datapolicy->enabled = 0;
149 $this->tabs = array();
178 $this->dictionaries = array();
183 $this->boxes = array();
188 $this->cronjobs = array(
189 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'),
195 $this->rights = array();
197 $this->menu = array();