FinalHelperTrait
Define a series of high-level, non-extensible helpers for WorkflowMessages, such as `renderTemplate()` or `sendTemplate()`.
These helpers are convenient because it should be common to take a WorkflowMessage instance and pass it to a template. However, WorkflowMessage is the data-model for content of a message -- templating is outside the purview of WorkflowMessage. Consequently, there should not be any substantial templating logic here. Instead, these helpers MUST ONLY delegate out to a canonical renderer.
Table of Contents
Methods
- assertValid() : mixed
- export() : array<string|int, mixed>|null
- renderTemplate() : array<string|int, mixed>
- sendTemplate() : array<string|int, mixed>
- validate() : array<string|int, mixed>
Methods
assertValid()
public
final assertValid([mixed $strict = FALSE ]) : mixed
Parameters
- $strict : mixed = FALSE
Tags
export()
public
abstract export([string|null $format = NULL ]) : array<string|int, mixed>|null
Parameters
- $format : string|null = NULL
Tags
Return values
array<string|int, mixed>|nullrenderTemplate()
public
final renderTemplate([array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed> = []
Tags
Return values
array<string|int, mixed>sendTemplate()
public
final sendTemplate([array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed> = []
Tags
Return values
array<string|int, mixed>validate()
public
abstract validate() : array<string|int, mixed>