dolibarr  21.0.0-alpha
Public Member Functions | Private Member Functions | List of all members
InterfaceTicketEmail Class Reference

Class of triggers for ticket module. More...

Inheritance diagram for InterfaceTicketEmail:
Inheritance graph
[legend]
Collaboration diagram for InterfaceTicketEmail:
Collaboration graph
[legend]

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 runTrigger ($action, $object, User $user, Translate $langs, Conf $conf)
 Function called when a Dolibarr business event is done. More...
 
- Public Member Functions inherited from DolibarrTriggers
 __construct (DoliDB $db)
 Constructor. More...
 
 getName ()
 Returns the name of the trigger file. More...
 
 getDesc ()
 Returns the description of trigger file. More...
 
 getVersion ()
 Returns the version of the trigger file. More...
 
 setErrorsFromObject (CommonObject $object)
 setErrorsFromObject More...
 

Private Member Functions

 composeAndSendAdminMessage ($sendto, $base_subject, $body, Ticket $object, Translate $langs)
 Composes and sends a message concerning a ticket, to be sent to admin address. More...
 
 composeAndSendCustomerMessage ($sendto, $base_subject, $body, $see_ticket, Ticket $object, Translate $langs)
 Composes and sends a message concerning a ticket, to be sent to customer addresses. More...
 

Detailed Description

Class of triggers for ticket module.

Definition at line 33 of file interface_50_modTicket_TicketEmail.class.php.

Constructor & Destructor Documentation

◆ __construct()

InterfaceTicketEmail::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 40 of file interface_50_modTicket_TicketEmail.class.php.

References name.

Member Function Documentation

◆ composeAndSendAdminMessage()

InterfaceTicketEmail::composeAndSendAdminMessage (   $sendto,
  $base_subject,
  $body,
Ticket  $object,
Translate  $langs 
)
private

Composes and sends a message concerning a ticket, to be sent to admin address.

Parameters
string$sendtoAddresses to send the mail, format "first@address.net, second@address.net," etc.
string$base_subjectemail subject. Non-translated string.
string$bodyemail body (first line). Non-translated string.
Ticket$objectthe ticket thet the email refers to
Translate$langsthe translation object
Returns
void

Definition at line 308 of file interface_50_modTicket_TicketEmail.class.php.

◆ composeAndSendCustomerMessage()

InterfaceTicketEmail::composeAndSendCustomerMessage (   $sendto,
  $base_subject,
  $body,
  $see_ticket,
Ticket  $object,
Translate  $langs 
)
private

Composes and sends a message concerning a ticket, to be sent to customer addresses.

Parameters
string$sendtoAddresses to send the mail, format "first@address.net, second@address.net, " etc.
string$base_subjectemail subject. Non-translated string.
string$bodyemail body (first line). Non-translated string.
string$see_ticketstring indicating the ticket public address
Ticket$objectthe ticket thet the email refers to
Translate$langsthe translation object
Returns
void

Definition at line 380 of file interface_50_modTicket_TicketEmail.class.php.

◆ runTrigger()

InterfaceTicketEmail::runTrigger (   $action,
  $object,
User  $user,
Translate  $langs,
Conf  $conf 
)

Function called when a Dolibarr business event is done.

All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers

Parameters
string$actionEvent action code
Ticket$objectObject
User$userObject user
Translate$langsObject langs
conf$confObject conf
Returns
int Return integer <0 if KO, 0 if no triggered ran, >0 if OK

Reimplemented from DolibarrTriggers.

Definition at line 62 of file interface_50_modTicket_TicketEmail.class.php.


The documentation for this class was generated from the following file: