KMP PHP API Reference

BestowalNotificationVarsService
in package
uses BestowalNotesSupportTrait, LocatorAwareTrait

Prepares email template variables for bestowal notification workflows.

Table of Contents

Properties

$bestowalsTable  : Table

Methods

__construct()  : mixed
prepare()  : array<string, mixed>
Prepare notification variables for a bestowal lifecycle email.
prepareCancelledVars()  : array<string, mixed>
Prepare vars specifically for bestowal cancellation notifications.
prepareCreatedVars()  : array<string, mixed>
Prepare vars specifically for bestowal creation notifications.
prepareStateChangedVars()  : array<string, mixed>
Prepare vars specifically for bestowal state-change notifications.
buildHeraldNotes()  : string|null
Build herald-oriented call text from linked recommendations.
buildNobleNotes()  : string|null
Summarize recommendation reasons for crown-facing notes.
buildReasonSummary()  : string|null
Build a persisted summary of linked recommendation reasons and submitters.
buildSpecialtySummary()  : string|null
Build the bestowal specialty from unique linked recommendation specialties.
formatAwardLabel()  : string
Format an award label with optional level for note text.
formatBestowalAwardLabel()  : string
Format the award selected on a bestowal for note and notification text.

Properties

Methods

__construct()

public __construct([Table|null $bestowalsTable = null ]) : mixed
Parameters
$bestowalsTable : Table|null = null

Optional injected bestowals table.

prepare()

Prepare notification variables for a bestowal lifecycle email.

public prepare(int $bestowalId, string $eventType[, array<string, mixed> $context = [] ]) : array<string, mixed>
Parameters
$bestowalId : int

Bestowal ID.

$eventType : string

Workflow event type (created, stateChanged, cancelled).

$context : array<string, mixed> = []

Optional workflow context overrides.

Return values
array<string, mixed>

prepareCancelledVars()

Prepare vars specifically for bestowal cancellation notifications.

public prepareCancelledVars(int $bestowalId[, string|null $closeReason = null ]) : array<string, mixed>
Parameters
$bestowalId : int

Bestowal ID.

$closeReason : string|null = null

Cancellation reason.

Return values
array<string, mixed>

prepareCreatedVars()

Prepare vars specifically for bestowal creation notifications.

public prepareCreatedVars(int $bestowalId) : array<string, mixed>
Parameters
$bestowalId : int

Bestowal ID.

Return values
array<string, mixed>

prepareStateChangedVars()

Prepare vars specifically for bestowal state-change notifications.

public prepareStateChangedVars(int $bestowalId[, string|null $previousState = null ][, string|null $newState = null ]) : array<string, mixed>
Parameters
$bestowalId : int

Bestowal ID.

$previousState : string|null = null

Previous bestowal state.

$newState : string|null = null

New bestowal state.

Return values
array<string, mixed>

buildHeraldNotes()

Build herald-oriented call text from linked recommendations.

protected buildHeraldNotes(array<int, Recommendation$recommendations, string $memberScaName) : string|null
Parameters
$recommendations : array<int, Recommendation>

Linked recommendations.

$memberScaName : string

Recipient SCA name.

Return values
string|null

buildNobleNotes()

Summarize recommendation reasons for crown-facing notes.

protected buildNobleNotes(array<int, Recommendation$recommendations) : string|null
Parameters
$recommendations : array<int, Recommendation>

Linked recommendations.

Return values
string|null

buildReasonSummary()

Build a persisted summary of linked recommendation reasons and submitters.

protected buildReasonSummary(array<int, Recommendation$recommendations) : string|null
Parameters
$recommendations : array<int, Recommendation>

Linked recommendations.

Return values
string|null

buildSpecialtySummary()

Build the bestowal specialty from unique linked recommendation specialties.

protected buildSpecialtySummary(array<int, Recommendation$recommendations) : string|null
Parameters
$recommendations : array<int, Recommendation>

Linked recommendations.

Return values
string|null

formatAwardLabel()

Format an award label with optional level for note text.

protected formatAwardLabel(Recommendation $recommendation) : string
Parameters
$recommendation : Recommendation

Recommendation with optional award contain.

Return values
string

formatBestowalAwardLabel()

Format the award selected on a bestowal for note and notification text.

protected formatBestowalAwardLabel(Bestowal $bestowal) : string
Parameters
$bestowal : Bestowal

Bestowal with optional award contain.

Return values
string
On this page

Search results