ActivitiesMailer
extends Mailer
in package
uses
TemplateAwareMailerTrait
Table of Contents
Methods
- __construct() : mixed
- Initialize the ActivitiesMailer.
- notifyApprover() : mixed
- Send notification approver.
- notifyApproverOfRetraction() : void
- Send notification approver of retraction.
- notifyRequester() : mixed
- Prepare and configure an email notifying a requester about an authorization request update.
- 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 ActivitiesMailer.
public
__construct() : mixed
Ensures the base Mailer is constructed.
notifyApprover()
Send notification approver.
public
notifyApprover(string $to, string $approvalToken, string $memberScaName, string $approverScaName, string $activityName) : mixed
Parameters
- $to : string
- $approvalToken : string
- $memberScaName : string
- $approverScaName : string
- $activityName : string
notifyApproverOfRetraction()
Send notification approver of retraction.
public
notifyApproverOfRetraction(string $to, string $activityName, string $approverScaName, string $requesterScaName) : void
Parameters
- $to : string
- $activityName : string
- $approverScaName : string
- $requesterScaName : string
notifyRequester()
Prepare and configure an email notifying a requester about an authorization request update.
public
notifyRequester(string $to, string $status, string $memberScaName, int $memberId, string $approverScaName, string $nextApproverScaName, string $activityName) : mixed
Sets recipient, sender, subject, and view variables used by the mail template (including links and participant names).
Parameters
- $to : string
-
Recipient email address.
- $status : string
-
Current status of the authorization request.
- $memberScaName : string
-
Display name of the member who requested the authorization.
- $memberId : int
-
Identifier of the member (used to build a link to the member card).
- $approverScaName : string
- $nextApproverScaName : string
-
Display name of the next approver in the workflow, if any.
- $activityName : string
-
Name of the activity associated with the authorization request.
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