WorkflowMessage
extends AbstractEntity
in package
A WorkflowMessage describes the inputs to an automated email messages, and it allows you to render or preview the content fo automated email messages.
For example, when a constituent donates online, CiviContribute uses the
contribution_online_receipt
workflow message. This expects certain inputs
(eg contactId
and contributionId
) and supports certain tokens
(eg {contribution.total_amount}
).
WorkflowMessages are related to MessageTemplates (by way of
WorkflowMessage.name
<=>MessageTemplate.workflow_name
).
The WorkflowMessage defines the contract or processing of the
message, and the MessageTemplate defines the literal prose. The prose
would change frequently (eg for different deployments, locales, timeframes,
and other whims), but contract would change conservatively (eg with a
code-update and with some attention to backward-compatibility/change-management).
Tags
Table of Contents
Methods
- __callStatic() : AbstractAction
- Magic method to return the action object for an api.
- checkAccess() : CheckAccessAction
- get() : BasicGetAction
- getActions() : GetActions
- getEntityName() : string
- Get entity name from called class
- getFields() : BasicGetFieldsAction
- getInfo() : array{name: string, title: string, description: string, title_plural: string, type: string, paths: array, class: string, primary_key: array, searchable: string, dao: string, label_field: string, icon: string}
- Reflection function called by Entity::get()
- getLinks() : GetLinks
- getTemplateFields() : BasicGetFieldsAction
- permissions() : array<string|int, mixed>
- Returns a list of permissions needed to access the various actions in this api.
- render() : Render
- getDaoName() : CRM_Core_DAO|string|null
- getEntityTitle() : string
- Overridable function to return a localized title for this entity.
Methods
__callStatic()
Magic method to return the action object for an api.
public
static __callStatic(string $action, array<string|int, mixed> $args) : AbstractAction
Parameters
- $action : string
- $args : array<string|int, mixed>
Tags
Return values
AbstractActioncheckAccess()
public
static checkAccess() : CheckAccessAction
Return values
CheckAccessActionget()
public
static get([bool $checkPermissions = TRUE ]) : BasicGetAction
Parameters
- $checkPermissions : bool = TRUE
Return values
BasicGetActiongetActions()
public
static getActions([bool $checkPermissions = TRUE ]) : GetActions
Parameters
- $checkPermissions : bool = TRUE
Return values
GetActionsgetEntityName()
Get entity name from called class
public
static getEntityName() : string
Return values
stringgetFields()
public
static getFields([bool $checkPermissions = TRUE ]) : BasicGetFieldsAction
Parameters
- $checkPermissions : bool = TRUE
Return values
BasicGetFieldsActiongetInfo()
Reflection function called by Entity::get()
public
static getInfo() : array{name: string, title: string, description: string, title_plural: string, type: string, paths: array, class: string, primary_key: array, searchable: string, dao: string, label_field: string, icon: string}
Tags
Return values
array{name: string, title: string, description: string, title_plural: string, type: string, paths: array, class: string, primary_key: array, searchable: string, dao: string, label_field: string, icon: string}getLinks()
public
static getLinks([bool $checkPermissions = TRUE ]) : GetLinks
Parameters
- $checkPermissions : bool = TRUE
Return values
GetLinksgetTemplateFields()
public
static getTemplateFields([bool $checkPermissions = TRUE ]) : BasicGetFieldsAction
Parameters
- $checkPermissions : bool = TRUE
Return values
BasicGetFieldsActionpermissions()
Returns a list of permissions needed to access the various actions in this api.
public
static permissions() : array<string|int, mixed>
Return values
array<string|int, mixed>render()
public
static render([bool $checkPermissions = TRUE ]) : Render
Parameters
- $checkPermissions : bool = TRUE
Return values
RendergetDaoName()
protected
static getDaoName() : CRM_Core_DAO|string|null
Return values
CRM_Core_DAO|string|nullgetEntityTitle()
Overridable function to return a localized title for this entity.
protected
static getEntityTitle([bool $plural = FALSE ]) : string
Parameters
- $plural : bool = FALSE
-
Whether to return a plural title.