Class Notifications
This library handles all the notification email deliveries
on the system.
Custom system settings for the notification section are loaded
during the execution of each class methods.
Methods summary
public
|
|
public
boolean
|
#
send_appointment_details( array $appointment_data, array $provider_data, array $service_data, array $customer_data, string $company_settings, string $title, string $message, string $appointment_link, $receiver_address )
Send an email with the appointment details.
Send an email with the appointment details.
This email template also needs an email title and an email text in order to complete
the appointment details.
Parameters
- $appointment_data
- Contains the appointment data.
- $provider_data
- Contains the provider data.
- $service_data
- Contains the service data.
- $customer_data
$company_settings Contains settings of the company. By the time the
"company_name", "company_link" and "company_email" values are required in the array.
- $company_settings
- $title The email title may vary depending the receiver.
- $title
- $message The email message may vary depending the receiver.
- $message
$appointment_link This link is going to enable the receiver to make changes
to the appointment record.
- $appointment_link
- $receiver_address The receiver email address.
- $receiver_address
Returns
boolean Returns the operation result.
Expectedexception
Exception Raises when an unexpected error occures.
|
public
|
#
send_delete_appointment( array $appointment_data, array $provider_data, array $service_data, array $customer_data, array $company_settings, string $to_address, string $reason )
Send an email notification to both provider and customer on appointment removal.
Send an email notification to both provider and customer on appointment removal.
Whenever an appointment is cancelled or removed, both the provider and customer
need to be informed. This method sends the same email twice.
IMPORTANT! This method's arguments should be taken
from database before the appointment record is deleted.
Parameters
- $appointment_data
- The record data of the removed appointment.
- $provider_data
- The record data of the appointment provider.
- $service_data
- The record data of the appointment service.
- $customer_data
- The record data of the appointment customer.
- $company_settings
Some settings that are required for this function.
By now this array must contain the following values: "company_link",
"company_name", "company_email".
- $to_address
- The email address of the email receiver.
- $reason
- The reason why the appointment is deleted.
|
public
|
#
send_password( string $password, string $email, $company_settings )
This method sends an email with the new password of a user.
This method sends an email with the new password of a user.
Parameters
- $password
- Contains the new password.
- $email
- The receiver's email address.
- $company_settings
|
public
|
#
send_new_installation( $company_name, $company_email, $company_link )
Sends a simple email to notify for a new installation.
Sends a simple email to notify for a new installation.
This method will be only used for tracking the number of installations. No personal
data will be retrieved for any other cause.
Returns
bool Returns the "send()" method result.
|
Magic methods summary