25 require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
36 public $element =
'actioncomm_reminder';
41 public $table_element =
'actioncomm_reminder';
46 public $ismultientitymanaged = 0;
51 public $picto =
'generic';
53 const STATUS_TODO = 0;
54 const STATUS_DONE = 1;
55 const STATUS_ERROR = -1;
79 public $fields = array(
80 'rowid' => array(
'type'=>
'integer',
'label'=>
'TechnicalID',
'visible'=>-1,
'enabled'=>1,
'position'=>1,
'notnull'=>1,
'index'=>1,
'comment'=>
"Id",),
81 'entity' => array(
'type'=>
'integer',
'label'=>
'Entity',
'visible'=>0,
'enabled'=>1,
'position'=>20,
'notnull'=>1,
'index'=>1,),
82 'dateremind' => array(
'type'=>
'datetime',
'label'=>
'DateRemind',
'visible'=>1,
'enabled'=>1,
'position'=>60,
'notnull'=>1,
'index'=>1,),
83 'typeremind' => array(
'type'=>
'varchar(32)',
'label'=>
'TypeRemind',
'visible'=>-1,
'enabled'=>1,
'position'=>55,
'notnull'=>1,
'comment'=>
"email, browser, sms",),
84 'fk_user' => array(
'type'=>
'integer',
'label'=>
'User',
'visible'=>-1,
'enabled'=>1,
'position'=>65,
'notnull'=>1,
'index'=>1,),
85 'offsetvalue' => array(
'type'=>
'integer',
'label'=>
'OffsetValue',
'visible'=>1,
'enabled'=>1,
'position'=>56,
'notnull'=>1,),
86 'offsetunit' => array(
'type'=>
'varchar(1)',
'label'=>
'OffsetUnit',
'visible'=>1,
'enabled'=>1,
'position'=>57,
'notnull'=>1,
'comment'=>
"y, m, d, w, h, i",),
87 'status' => array(
'type'=>
'integer',
'label'=>
'Status',
'visible'=>1,
'enabled'=>1,
'position'=>58,
'notnull'=>1,
'default'=>0,
'index'=>0,
'arrayofkeyval'=>array(
'0'=>
'ToDo',
'1'=>
'Done')),
88 'lasterror' => array(
'type'=>
'varchar(128)',
'label'=>
'LastError',
'visible'=>-1,
'enabled'=>1,
'position'=>59,
'index'=>0),
89 'fk_actioncomm' => array(
'type'=>
'integer',
'label'=>
'Project',
'visible'=>1,
'enabled'=>1,
'position'=>70,
'notnull'=>1,
'index'=>1,),
90 'fk_email_template' => array(
'type'=>
'integer',
'label'=>
'EmailTemplate',
'visible'=>1,
'enabled'=>1,
'position'=>80,
'notnull'=>0),
127 public $fk_actioncomm;
132 public $fk_email_template;
149 if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
150 $this->fields[
'rowid'][
'visible'] = 0;
153 $this->fields[
'entity'][
'enabled'] = 0;
177 public function fetch($id, $ref =
null)
202 public function delete(
User $user, $notrigger =
false)
215 return $this->
LibStatut($this->status, $mode);
231 $labelStatus = $langs->transnoentitiesnoconv(
'ToDo');
233 $labelStatus = $langs->transnoentitiesnoconv(
'Done');
234 } elseif ($status == -1) {
235 $labelStatus = $langs->transnoentitiesnoconv(
'Error');
238 $labelStatusShort = $langs->transnoentitiesnoconv(
'ToDo');
240 $labelStatus = $langs->transnoentitiesnoconv(
'Done');
241 } elseif ($status == -1) {
242 $labelStatus = $langs->transnoentitiesnoconv(
'Error');
245 $statusType =
'status5';
247 $statusType =
'status4';
248 } elseif ($status == -1) {
249 $statusType =
'status8';
252 return dolGetStatus($labelStatus, $labelStatusShort,
'', $statusType, $mode);
Class for ActionCommReminder.
fetch($id, $ref=null)
Load object in memory from the database.
update(User $user, $notrigger=false)
Update object into database.
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen.
static LibStatut($status, $mode=0)
Return the status.
__construct(DoliDB $db)
Constructor.
getLibStatut($mode=0)
Return label of the status of a reminder.
create(User $user, $notrigger=false)
Create object into database.
Parent class of all other business classes (invoices, contracts, proposals, orders,...
fetchCommon($id, $ref=null, $morewhere='')
Load object in memory from the database.
createCommon(User $user, $notrigger=false)
Create object into database.
deleteCommon(User $user, $notrigger=false, $forcechilddeletion=0)
Delete object in database.
initAsSpecimenCommon()
Initialise object with example values Id must be 0 if object instance is a specimen.
updateCommon(User $user, $notrigger=false)
Update object into database.
Class to manage Dolibarr database access.
Class to manage Dolibarr users.
dolGetStatus($statusLabel='', $statusLabelShort='', $html='', $statusType='status0', $displayMode=0, $url='', $params=array())
Output the badge of a status.
isModEnabled($module)
Is Dolibarr module enabled.
$conf db
API class for accounts.