OfficersMailer
extends Mailer
in package
uses
TemplateAwareMailerTrait
Table of Contents
Methods
- __construct() : mixed
- Initialize the OfficersMailer instance.
- notifyOfHire() : mixed
- Send notification of hire.
- notifyOfRelease() : mixed
- Prepares an email notifying a recipient that a member has been released from an office.
- render() : array<string|int, mixed>
- Override the render method to use database templates
- getCurrentAction() : string|null
- Get the current action being called This is determined by looking at the backtrace
- getDbTemplate() : EmailTemplate|null
- Get database template for current mailer and action
- renderFromDb() : array<string|int, mixed>
- Render email from database template
Methods
__construct()
Initialize the OfficersMailer instance.
public
__construct() : mixed
notifyOfHire()
Send notification of hire.
public
notifyOfHire(string $to, string $memberScaName, string $officeName, string $branchName, string $hireDate, string $endDate, bool $requiresWarrant) : mixed
Parameters
- $to : string
- $memberScaName : string
- $officeName : string
- $branchName : string
- $hireDate : string
- $endDate : string
- $requiresWarrant : bool
notifyOfRelease()
Prepares an email notifying a recipient that a member has been released from an office.
public
notifyOfRelease(string $to, string $memberScaName, string $officeName, string $branchName, string $reason, string $releaseDate) : mixed
Configures recipient, sender, subject, and template variables used by the mail view.
Parameters
- $to : string
-
Recipient email address.
- $memberScaName : string
-
Member's SCA name.
- $officeName : string
-
Name of the office from which the member is released.
- $branchName : string
-
Branch or region associated with the office.
- $reason : string
-
Reason for the release.
- $releaseDate : string
-
Release date (formatted for display in the email template).
render()
Override the render method to use database templates
public
render([string $content = '' ]) : array<string|int, mixed>
Parameters
- $content : string = ''
-
Content
Return values
array<string|int, mixed>getCurrentAction()
Get the current action being called This is determined by looking at the backtrace
protected
getCurrentAction() : string|null
Return values
string|nullgetDbTemplate()
Get database template for current mailer and action
protected
getDbTemplate() : EmailTemplate|null
Return values
EmailTemplate|nullrenderFromDb()
Render email from database template
protected
renderFromDb(EmailTemplate $template[, string $content = '' ]) : array<string|int, mixed>
Parameters
- $template : EmailTemplate
-
Database template
- $content : string = ''
-
Fallback content