27require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
38 public $element =
'actioncomm_reminder';
43 public $table_element =
'actioncomm_reminder';
48 public $picto =
'generic';
50 const STATUS_TODO = 0;
51 const STATUS_DONE = 1;
52 const STATUS_ERROR = -1;
76 public $fields = array(
77 'rowid' => array(
'type' =>
'integer',
'label' =>
'TechnicalID',
'visible' => -1,
'enabled' => 1,
'position' => 1,
'notnull' => 1,
'index' => 1,
'comment' =>
"Id",),
78 'entity' => array(
'type' =>
'integer',
'label' =>
'Entity',
'visible' => 0,
'enabled' => 1,
'position' => 20,
'notnull' => 1,
'index' => 1,),
79 'dateremind' => array(
'type' =>
'datetime',
'label' =>
'DateRemind',
'visible' => 1,
'enabled' => 1,
'position' => 60,
'notnull' => 1,
'index' => 1,),
80 'typeremind' => array(
'type' =>
'varchar(32)',
'label' =>
'TypeRemind',
'visible' => -1,
'enabled' => 1,
'position' => 55,
'notnull' => 1,
'comment' =>
"email, browser, sms",),
81 'fk_user' => array(
'type' =>
'integer',
'label' =>
'User',
'visible' => -1,
'enabled' => 1,
'position' => 65,
'notnull' => 1,
'index' => 1,),
82 'offsetvalue' => array(
'type' =>
'integer',
'label' =>
'OffsetValue',
'visible' => 1,
'enabled' => 1,
'position' => 56,
'notnull' => 1,),
83 'offsetunit' => array(
'type' =>
'varchar(1)',
'label' =>
'OffsetUnit',
'visible' => 1,
'enabled' => 1,
'position' => 57,
'notnull' => 1,
'comment' =>
"y, m, d, w, h, i",),
84 'status' => array(
'type' =>
'integer',
'label' =>
'Status',
'visible' => 1,
'enabled' => 1,
'position' => 58,
'notnull' => 1,
'default' =>
'0',
'index' => 0,
'arrayofkeyval' => array(
'0' =>
'ToDo',
'1' =>
'Done')),
85 'lasterror' => array(
'type' =>
'varchar(128)',
'label' =>
'LastError',
'visible' => -1,
'enabled' => 1,
'position' => 59,
'index' => 0),
86 'fk_actioncomm' => array(
'type' =>
'integer',
'label' =>
'Project',
'visible' => 1,
'enabled' => 1,
'position' => 70,
'notnull' => 1,
'index' => 1,),
87 'fk_email_template' => array(
'type' =>
'integer',
'label' =>
'EmailTemplate',
'visible' => 1,
'enabled' => 1,
'position' => 80,
'notnull' => 0),
135 public $fk_actioncomm;
140 public $fk_email_template;
154 $this->ismultientitymanaged = 0;
157 $this->fields[
'rowid'][
'visible'] = 0;
159 if (!isModEnabled(
'multicompany')) {
160 $this->fields[
'entity'][
'enabled'] = 0;
184 public function fetch($id, $ref =
null)
209 public function delete(
User $user, $notrigger = 0)
238 $labelStatus = $langs->transnoentitiesnoconv(
'ToDo');
240 $labelStatus = $langs->transnoentitiesnoconv(
'Done');
241 } elseif ($status == -1) {
242 $labelStatus = $langs->transnoentitiesnoconv(
'Error');
245 $labelStatusShort = $langs->transnoentitiesnoconv(
'ToDo');
247 $labelStatus = $langs->transnoentitiesnoconv(
'Done');
248 } elseif ($status == -1) {
249 $labelStatus = $langs->transnoentitiesnoconv(
'Error');
252 $statusType =
'status5';
254 $statusType =
'status4';
255 } elseif ($status == -1) {
256 $statusType =
'status8';
259 return dolGetStatus($labelStatus, $labelStatusShort,
'', $statusType, $mode);
print $langs trans("AuditedSecurityEvents").'</strong >< span class="opacitymedium"></span >< br > status
Or an array listing all the potential status of the object: array: int of the status => translated la...
Class for ActionCommReminder.
fetch($id, $ref=null)
Load object in memory from the 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.
create(User $user, $notrigger=0)
Create object into database.
update(User $user, $notrigger=0)
Update object into database.
__construct(DoliDB $db)
Constructor.
getLibStatut($mode=0)
Return label of the status of a reminder.
Parent class of all other business classes (invoices, contracts, proposals, orders,...
createCommon(User $user, $notrigger=0)
Create object in the database.
updateCommon(User $user, $notrigger=0)
Update object into database.
initAsSpecimenCommon()
Initialise object with example values Id must be 0 if object instance is a specimen.
fetchCommon($id, $ref=null, $morewhere='', $noextrafields=0)
Load object in memory from the database.
deleteCommon(User $user, $notrigger=0, $forcechilddeletion=0)
Delete object in database.
Class to manage Dolibarr database access.
Class to manage Dolibarr users.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.