CRM_Member_WorkflowMessage_Membership_Membership
extends WorkflowMessageExample
in package
Examples for membership templates.
Tags
Table of Contents
Properties
- $exName : string
- Name for this example specifically.
- $wfClass : string
- Name of the workflow for which we are providing example data.
- $wfName : string|null
- Name of the workflow for which we are providing example data.
- $contributionPages : mixed
- $priceSets : mixed
Methods
- __construct() : mixed
- WorkflowMessageExample constructor.
- build() : void
- Build an example to use when rendering the workflow.
- extend() : array<string|int, mixed>
- Get an example, merge/extend it with more data, and return the extended variant.
- getExampleName() : string
- Get the example name.
- getExamples() : iterable<string|int, mixed>
- Get the examples this class is able to deliver.
- setWorkflowName() : void
- Set the workflow name.
- toArray() : mixed
- addExampleData() : void
- Add relevant example data.
- getContributionPage() : array<string|int, mixed>
- getPriceSet() : array<string|int, mixed>|null
- Get a non-quick-config price set.
- setLineItem() : void
Properties
$exName
Name for this example specifically.
protected
string
$exName
$wfClass
Name of the workflow for which we are providing example data.
protected
string
$wfClass
Ex: 'CRM_Case_WorkflowMessage_CaseActivity'
$wfName
Name of the workflow for which we are providing example data.
protected
string|null
$wfName
Ex: 'case_activity'
$contributionPages
private
mixed
$contributionPages
$priceSets
private
mixed
$priceSets
Methods
__construct()
WorkflowMessageExample constructor.
public
__construct() : mixed
build()
Build an example to use when rendering the workflow.
public
build(array<string|int, mixed> &$example) : void
Parameters
- $example : array<string|int, mixed>
Tags
extend()
Get an example, merge/extend it with more data, and return the extended variant.
public
extend(array<string|int, mixed> $base[, array<string|int, mixed> $overrides = [] ]) : array<string|int, mixed>
Parameters
- $base : array<string|int, mixed>
-
Baseline data to build upon.
- $overrides : array<string|int, mixed> = []
-
Additional data to recursively add.
Return values
array<string|int, mixed> —The result of merging the original example with the $overrides.
getExampleName()
Get the example name.
public
getExampleName() : string
Return values
stringgetExamples()
Get the examples this class is able to deliver.
public
getExamples() : iterable<string|int, mixed>
Tags
Return values
iterable<string|int, mixed>setWorkflowName()
Set the workflow name.
public
setWorkflowName(string $workflowName) : void
The workflow name is the value in civicrm_message_template.workflow.
Parameters
- $workflowName : string
toArray()
protected
toArray(WorkflowMessageInterface $wfMsg) : mixed
Parameters
- $wfMsg : WorkflowMessageInterface
addExampleData()
Add relevant example data.
private
addExampleData(CRM_Member_WorkflowMessage_MembershipOfflineReceipt|CRM_Member_WorkflowMessage_MembershipOnlineReceipt $messageTemplate, array<string|int, mixed> $example) : void
Parameters
- $messageTemplate : CRM_Member_WorkflowMessage_MembershipOfflineReceipt|CRM_Member_WorkflowMessage_MembershipOnlineReceipt
- $example : array<string|int, mixed>
Tags
getContributionPage()
private
getContributionPage(int $id) : array<string|int, mixed>
Parameters
- $id : int
Tags
Return values
array<string|int, mixed>getPriceSet()
Get a non-quick-config price set.
private
getPriceSet() : array<string|int, mixed>|null
Tags
Return values
array<string|int, mixed>|nullsetLineItem()
private
setLineItem(CRM_Financial_BAO_Order $mockOrder, mixed $priceField, array<string|int, mixed>|null $priceFieldValue, mixed $index, mixed $membership) : void
Parameters
- $mockOrder : CRM_Financial_BAO_Order
- $priceField : mixed
- $priceFieldValue : array<string|int, mixed>|null
- $index : mixed
- $membership : mixed