EmailsDispatcher
in package

Tags
since
1.1.0

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
access

protected

since
1.1.0
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
see
Plugin::load()
since
1.1.0
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
since
1.1.0
Return values
bool

triggerBookingUpdate()

public triggerBookingUpdate(Booking $booking, string $newStatus, string $oldStatus) : mixed
Parameters
$booking : Booking
$newStatus : string
$oldStatus : string
Tags
access

protected

see
BookingStatuses::notifyTransition()
since
1.1.0
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
since
1.1.0
Return values
bool

triggerNewAdminBooking()

public triggerNewAdminBooking(Booking $booking) : mixed
Parameters
$booking : Booking
Tags
see
EditBookingPage::afterSave()
since
1.10.1
Return values
mixed

triggerNewUserBooking()

public triggerNewUserBooking(Booking $booking) : mixed
Parameters
$booking : Booking
Tags
access

protected

see
BookingStatuses::notifyTransition()
since
1.1.0

(As method triggerNewBooking())

since
1.10.1

renamed to triggerNewUserBooking().

Return values
mixed

addActions()

protected addActions() : mixed
Tags
since
1.1.0
Return values
mixed

checkRecipients()

protected checkRecipients(AbstractEmail $email[, bool $isTest = false ]) : bool
Parameters
$email : AbstractEmail
$isTest : bool = false

Optional. False by default.

Tags
since
1.1.0
Return values
bool

getLogAuthor()

protected getLogAuthor() : int|null
Tags
since
1.1.0
Return values
int|null

getRecipients()

protected getRecipients(AbstractEmail $email[, bool $isTest = false ]) : string
Parameters
$email : AbstractEmail
$isTest : bool = false

Optional. False by default.

Tags
since
1.1.0
Return values
string

log()

protected log(Booking $booking, string $message) : mixed
Parameters
$booking : Booking
$message : string
Tags
since
1.1.0
Return values
mixed

recipientsError()

protected recipientsError(AbstractEmail $email) : string
Parameters
$email : AbstractEmail
Tags
since
1.1.0
Return values
string

sendedMessage()

protected sendedMessage(AbstractEmail $email, bool $isSended) : string
Parameters
$email : AbstractEmail
$isSended : bool
Tags
since
1.1.0
Return values
string

typeOfEmail()

protected typeOfEmail(AbstractEmail $email) : string
Parameters
$email : AbstractEmail
Tags
since
1.1.0
Return values
string

admin|customer|notification|other

Search results