Documentation

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
searchable

none

since
5.43

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

getEntityName()

Get entity name from called class

public static getEntityName() : string
Return values
string

getInfo()

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
inheritDoc
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}
public static getLinks([bool $checkPermissions = TRUE ]) : GetLinks
Parameters
$checkPermissions : bool = TRUE
Return values
GetLinks

permissions()

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
Render

getEntityTitle()

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.

Return values
string

        
On this page

Search results