Notify
class Notify (View source)
Class to manage the table of subscription to notifications
Properties
| int | $id | ||
| DoliDB | $db | ||
| string | $type | ||
| string | $threshold | ||
| string | $context | ||
| int | $event | ||
| int | $socid | ||
| int | $contact_id | ||
| int | $fk_user | ||
| string | |||
| int | $datec | Date creation record (datec) |
|
| int | $datem | Date modified record (datem) |
|
| string | $error | ||
| string[] | $errors | ||
| string | $author | ||
| string | $ref | ||
| int | $date | ||
| int | $duree | ||
| string | $note | ||
| int | $fk_project | ||
| static | $arrayofnotifsupported |
Methods
Return message that say how many notification (and to which email) will occurs on requested event.
Delete a notification from database
Create notification information record.
Load record from database
Update record in database
Return number of notifications activated, for all or a given action code (and third party)
Check if notification are active for couple action/company.
Details
__construct(DoliDB $db)
Constructor
string
confirmMessage(string $action, $socid, $object)
Return message that say how many notification (and to which email) will occurs on requested event.
This is to show confirmation messages before event is recorded.
delete(User $user = null)
Delete a notification from database
int
create(User $user = null, int<0, 1> $notrigger = 0)
Create notification information record.
fetch(int $id, $socid = 0, $type = 'email')
Load record from database
int
update(User $user = null, $notrigger = 0)
Update record in database
array|int
getNotificationsArray(string $notifcode, int $socid = 0, CommonObject $object = null, int $userid = 0, array $scope = array('thirdparty', 'user', 'global'))
Return number of notifications activated, for all or a given action code (and third party)
int
send(string $notifcode, $object, string[] $filename_list = array(), string[] $mimetype_list = array(), string[] $mimefilename_list = array())
Check if notification are active for couple action/company.
If yes, send mail and save trace into llx_notify.