EmailsDispatcher
in package
Tags
Table of Contents
- filterSettings() : array<string|int, mixed>
- isSuspended() : bool
- load() : mixed
- By default loads on "plugins_loaded" (15).
- sendEmail() : bool
- triggerBookingUpdate() : mixed
- triggerEmail() : bool
- triggerNewAdminBooking() : mixed
- triggerNewUserBooking() : mixed
- addActions() : mixed
- checkRecipients() : bool
- getLogAuthor() : int|null
- getRecipients() : string
- log() : mixed
- recipientsError() : string
- sendedMessage() : string
- typeOfEmail() : string
Methods
filterSettings()
public
filterSettings(array<string|int, mixed> $fields, string $sectionName) : array<string|int, mixed>
Parameters
- $fields : array<string|int, mixed>
- $sectionName : string
Tags
Return values
array<string|int, mixed> —isSuspended()
public
isSuspended() : bool
Return values
bool —load()
By default loads on "plugins_loaded" (15).
public
load() : mixed
Tags
Return values
mixed —sendEmail()
public
sendEmail(AbstractEmail $email, Booking $booking[, array<string|int, mixed> $args = [] ]) : bool
Parameters
- $email : AbstractEmail
- $booking : Booking
- $args : array<string|int, mixed> = []
-
Optional. @param Entities\Payment $args['payment'] Null by default. @param bool $args['is_test'] False by default.
Tags
Return values
bool —triggerBookingUpdate()
public
triggerBookingUpdate(Booking $booking, string $newStatus, string $oldStatus) : mixed
Parameters
- $booking : Booking
- $newStatus : string
- $oldStatus : string
Tags
Return values
mixed —triggerEmail()
public
triggerEmail(AbstractEmail $email, Booking $booking[, array<string|int, mixed> $args = [] ]) : bool
Parameters
- $email : AbstractEmail
- $booking : Booking
- $args : array<string|int, mixed> = []
-
Optional. @param bool $args['is_test'] False by default.
Tags
Return values
bool —triggerNewAdminBooking()
public
triggerNewAdminBooking(Booking $booking) : mixed
Parameters
- $booking : Booking
Tags
Return values
mixed —triggerNewUserBooking()
public
triggerNewUserBooking(Booking $booking) : mixed
Parameters
- $booking : Booking
Tags
Return values
mixed —addActions()
protected
addActions() : mixed
Tags
Return values
mixed —checkRecipients()
protected
checkRecipients(AbstractEmail $email[, bool $isTest = false ]) : bool
Parameters
- $email : AbstractEmail
- $isTest : bool = false
-
Optional. False by default.
Tags
Return values
bool —getLogAuthor()
protected
getLogAuthor() : int|null
Tags
Return values
int|null —getRecipients()
protected
getRecipients(AbstractEmail $email[, bool $isTest = false ]) : string
Parameters
- $email : AbstractEmail
- $isTest : bool = false
-
Optional. False by default.
Tags
Return values
string —log()
protected
log(Booking $booking, string $message) : mixed
Parameters
- $booking : Booking
- $message : string
Tags
Return values
mixed —recipientsError()
protected
recipientsError(AbstractEmail $email) : string
Parameters
- $email : AbstractEmail
Tags
Return values
string —sendedMessage()
protected
sendedMessage(AbstractEmail $email, bool $isSended) : string
Parameters
- $email : AbstractEmail
- $isSended : bool
Tags
Return values
string —typeOfEmail()
protected
typeOfEmail(AbstractEmail $email) : string
Parameters
- $email : AbstractEmail
Tags
Return values
string —admin|customer|notification|other