dolibarr
20.0.0-beta
|
Class to manage the table of subscription to notifications. More...
Public Member Functions | |
__construct ($db) | |
Constructor. More... | |
confirmMessage ($action, $socid, $object) | |
Return message that say how many notification (and to which email) will occurs on requested event. More... | |
delete (User $user=null) | |
Delete a notification from database. More... | |
create (User $user=null, $notrigger=0) | |
Create notification information record. More... | |
fetch ($id, $socid=0, $type='email') | |
Load record from database. More... | |
update (User $user=null, $notrigger=-1) | |
Update record in database. More... | |
getNotificationsArray ($notifcode, $socid=0, $object=null, $userid=0, $scope=array('thirdparty', 'user', 'global')) | |
Return number of notifications activated, for all or a given action code (and third party) More... | |
send ($notifcode, $object, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array()) | |
Check if notification are active for couple action/company. More... | |
Class to manage the table of subscription to notifications.
Definition at line 37 of file notify.class.php.
Notify::__construct | ( | $db | ) |
Notify::confirmMessage | ( | $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.
string | $action | Id of action in llx_c_action_trigger |
int | $socid | Id of third party |
Object | $object | Object the notification is about |
Definition at line 174 of file notify.class.php.
Notify::create | ( | User | $user = null , |
$notrigger = 0 |
|||
) |
Create notification information record.
Definition at line 285 of file notify.class.php.
Notify::delete | ( | User | $user = null | ) |
Delete a notification from database.
Definition at line 251 of file notify.class.php.
Notify::fetch | ( | $id, | |
$socid = 0 , |
|||
$type = 'email' |
|||
) |
Load record from database.
int | $id | Id of record |
int | $socid | Id of company. If this is filled, function will return only records belonging to this thirdparty |
string | $type | If id of company filled, we say if we want record of this type only |
Definition at line 336 of file notify.class.php.
References $sql.
Notify::getNotificationsArray | ( | $notifcode, | |
$socid = 0 , |
|||
$object = null , |
|||
$userid = 0 , |
|||
$scope = array('thirdparty', 'user', 'global') |
|||
) |
Return number of notifications activated, for all or a given action code (and third party)
string | $notifcode | Code of action in llx_c_action_trigger (new usage) or Id of action in llx_c_action_trigger (old usage) |
int | $socid | Id of third party or 0 for all thirdparties or -1 for no thirdparties |
Object | $object | Object the notification is about (need it to check threshold value of some notifications) |
int | $userid | Id of user or 0 for all users or -1 for no users |
array | $scope | Scope where to search |
Definition at line 440 of file notify.class.php.
Notify::send | ( | $notifcode, | |
$object, | |||
$filename_list = array() , |
|||
$mimetype_list = array() , |
|||
$mimefilename_list = array() |
|||
) |
Check if notification are active for couple action/company.
If yes, send mail and save trace into llx_notify.
string | $notifcode | Code of action in llx_c_action_trigger (new usage) or Id of action in llx_c_action_trigger (old usage) |
Object | $object | Object the notification deals on |
array | $filename_list | List of files to attach (full path of filename on file system) |
array | $mimetype_list | List of MIME type of attached files |
array | $mimefilename_list | List of attached file name in message |
Definition at line 607 of file notify.class.php.
Notify::update | ( | User | $user = null , |
$notrigger = -1 |
|||
) |
Update record in database.
User | null | $user | Object user |
int | $notrigger | 1=Disable triggers |
Definition at line 387 of file notify.class.php.