Documentation

CRM_Event_WorkflowMessage_EventOfflineReceipt extends GenericWorkflowMessage
in package
uses CRM_Event_WorkflowMessage_ParticipantTrait, CRM_Contribute_WorkflowMessage_ContributionTrait, CustomFieldTrait

Receipt sent when confirming a back office participation record.

Tags
support

template-only

see
CRM_Event_Form_Participant::submit()
see
CRM_Event_Form_ParticipantFeeSelection::emailReceipt

Table of Contents

Constants

WORKFLOW  = 'event_offline_receipt'

Properties

$contribution  : array<string|int, mixed>|null
The contribution.
$contributionID  : int
$currentParticipant  : array<string|int, mixed>
The current participant (if there are multiple this is the one being emailed).
$customFields  : array<string|int, mixed>
Viewable custom fields for the primary participant.
$eventID  : int
$financialTrxn  : array<string|int, mixed>|null
Optional financial transaction (payment).
$financialTrxnID  : int
$isPrimary  : bool
Is this the primary participant.
$isShowLineItems  : bool
Should line items be displayed for the contribution.
$isShowLineSubtotal  : bool
Is it a good idea to show the line item subtotal.
$isShowParticipantCount  : bool
Should a participant count column be shown.
$isShowTax  : bool
Is the site configured such that tax should be displayed.
$lineItems  : array<string|int, mixed>
Line items associated with the contribution.
$participant  : array<string|int, mixed>|null
The participant record.
$participantCount  : bool
What is the participant count, if 'specifically configured'.
$participantID  : int
$participants  : array<string|int, mixed>
Line items indexed by the participant.
$taxRateBreakdown  : array<string|int, mixed>
Tax rates paid.
$_extras  : array<string|int, mixed>
The extras are an open-ended list of fields that will be passed-through to tpl, tokenContext, etc. This is the storage of last-resort for imported values that cannot be stored by other means.
$bcc  : string|null
Additional recipients (multiple addresses).
$cc  : string|null
Additional recipients (multiple addresses).
$contact  : array<string|int, mixed>|null
$contactID  : int|null
The contact receiving this message.
$from  : string|null
The email sender (single address).
$isTest  : bool
$locale  : string|null
$participantContacts  : array<string|int, mixed>
Details of the participant contacts.
$replyTo  : string|null
The email sender's Reply-To (single address).
$requestedLocale  : string|null
The language that was requested to be rendered.
$template  : array<string|int, mixed>|null
The content of the message-template.
$templateId  : int|null
$to  : string|null
The primary email recipient (single address).
$userEnteredHTML  : string
Additional html to include in the receipt.
$userEnteredText  : string
Additional text to include in the receipt.
$order  : CRM_Financial_BAO_Order

Methods

__call()  : static|mixed
Magic function to provide getters/setters.
__construct()  : mixed
WorkflowMessage constructor.
addBcc()  : $this
Add another "BCC:" address.
addCc()  : $this
Add another "CC:" address.
assertValid()  : mixed
export()  : array<string|int, mixed>|null
getBcc()  : array<string|int, mixed>|string
Get the list of "Bcc:" addresses.
getCc()  : array<string|int, mixed>|string
Get the list of "Cc:" addresses.
getContact()  : array<string|int, mixed>|null
getContactID()  : int|null
getContribution()  : array<string|int, mixed>|null
getCurrentParticipant()  : array<string|int, mixed>
Get the line items and tax information indexed by participant.
getCustomFields()  : array<string|int, mixed>
Get the custom fields for display for the participant, if not primary.
getFields()  : array<string|int, mixed>
getFrom()  : array<string|int, mixed>|string
Get the "From:" address.
getGroupName()  : string|null
getIsPrimary()  : bool
Is the participant the primary participant.
getIsShowLineItems()  : bool
Get bool for whether a line item breakdown be displayed.
getIsShowLineSubtotal()  : bool
Is it a good idea to show the line item subtotal.
getIsShowParticipantCount()  : bool
It is a good idea to show the participant count column.
getLineItems()  : array<string|int, mixed>
Get the line items.
getLocale()  : string
getParticipant()  : array<string|int, mixed>
Get the participant record.
getParticipantCount()  : mixed
Get the count of participants, where count is used in the line items.
getParticipants()  : array<string|int, mixed>
Get the line items and tax information indexed by participant.
getPrimaryParticipantID()  : int
getReplyTo()  : array<string|int, mixed>|string
Get the "Reply-To:" address.
getRequestedLocale()  : string
Get the requested locale.
getTaxRateBreakdown()  : array<string|int, mixed>
Get the line items.
getTo()  : array<string|int, mixed>|string
Get the list of "To:" addresses.
getUserEnteredHTML()  : string|null
getUserEnteredText()  : string|null
getWorkflowName()  : string|null
import()  : mixed
renderTemplate()  : array<string|int, mixed>
resolveContent()  : array<string|int, mixed>
sendTemplate()  : array<string|int, mixed>
setBcc()  : $this
Set the "BCC:" list.
setCc()  : $this
Set the "CC:" list.
setContact()  : $this
setContactID()  : $this
setContribution()  : $this
Set contribution object.
setEventID()  : CRM_Event_WorkflowMessage_ParticipantTrait
setFinancialTrxn()  : $this
Set contribution object.
setFrom()  : $this
setLocale()  : $this
setOrder()  : $this
Set order object.
setParticipant()  : $this
Set participant object.
setParticipantContacts()  : CRM_Event_WorkflowMessage_ParticipantTrait
setParticipantID()  : mixed
setReplyTo()  : $this
setRequestedLocale()  : $this
Set the requested locale.
setTo()  : $this
setUserEnteredHTML()  : $this
setUserEnteredText()  : $this
validate()  : array<string|int, mixed>
Determine if the data for this workflow message is complete/well-formed.
exportExtraEnvelope()  : void
Get a list of key-value pairs to include the Smarty template context.
exportExtraEnvelope_toAddress()  : void
Plugin to `WorkflowMessageInterface::export()` and handle toEmail/toName.
exportExtraModelProps()  : void
Get a list of key-value pairs to include the array-coded version of the class.
exportExtraTokenContext()  : void
Specify any tokens that should be exported as smarty variables.
exportExtraTplParams()  : void
Extra variables to be exported to smarty based on being calculated.
getCustomFieldDisplay()  : array<string|int, mixed>
Given an entity loaded through apiv4 return an array of custom fields for display.
getFieldsByFormat()  : array<string|int, mixed>|null
getFieldsToLoadForParticipant()  : array<string|int, mixed>
Get the participant fields we need to load.
getFilteredCustomFields()  : array<string|int, mixed>
Get a list of custom fields that are 'viewable'.
getMagicProperties()  : array<string|int, mixed>
Get a list of class properties for which magic methods are supported.
importExtraEnvelope()  : void
Given an import-array (in the envelope-format), pull out any interesting values.
importExtraEnvelope_toAddress()  : void
Plugin to `WorkflowMessageInterface::import()` and handle toEmail/toName.
importExtraModelProps()  : void
Given an import-array (in the class-format), pull out any interesting values.
importExtraTokenContext()  : void
Given an import-array (in the token-context-format), pull out any interesting values.
importExtraTplParams()  : void
Given an import-array (in the tpl-format), pull out any interesting values.
validateExtra_contact()  : mixed
Must provide either 'int $contactId' or 'array $contact'
validateExtra_localization()  : mixed
formatAddress()  : array<string|int, mixed>|string|null
Convert an address to the desired format.
getOrder()  : CRM_Financial_BAO_Order|null
Get order, if available.
getParticipantContact()  : mixed
isCiviContributeEnabled()  : bool

Constants

Properties

$contribution

The contribution.

public array<string|int, mixed>|null $contribution
Tags
scope

tokenContext as contribution

$contributionID

public int $contributionID
Tags
scope

tokenContext as contributionId, tplParams as contributionID

$currentParticipant

The current participant (if there are multiple this is the one being emailed).

public array<string|int, mixed> $currentParticipant

This uses the same format as the participants array.

Tags
scope

tplParams as participant

$customFields

Viewable custom fields for the primary participant.

public array<string|int, mixed> $customFields

This array is in the format

['customGroupLabel' => [['customFieldLabel' => 'customFieldValue'], ['customFieldLabel' => 'customFieldValue']]

It is only added for the primary participant (which reflects historical form behaviour) and only fields were the group has is_public = TRUE and the field has is_view = FALSE. Fields are restricted to those viewable by the logged in user (reflecting the fact this is historically triggered by a back office user form submission and also preventing using an email to see acl-blocked custom fields).

Tags
scope

tplParams as customGroup

$eventID

public int $eventID
Tags
scope

tokenContext as eventId, tplParams as eventID

$financialTrxn

Optional financial transaction (payment).

public array<string|int, mixed>|null $financialTrxn
Tags
scope

tokenContext as financial_trxn

$financialTrxnID

public int $financialTrxnID
Tags
scope

tokenContext as financial_trxnId

$isPrimary

Is this the primary participant.

public bool $isPrimary
Tags
scope

tplParams as isPrimary

$isShowLineItems

Should line items be displayed for the contribution.

public bool $isShowLineItems

This determination is based on whether the price set is quick config.

Tags
scope

tplParams

$isShowLineSubtotal

Is it a good idea to show the line item subtotal.

public bool $isShowLineSubtotal

This would be true if at least one line has a quantity > 1. Otherwise it is very repetitive.

Tags
scope

tplParams

$isShowParticipantCount

Should a participant count column be shown.

public bool $isShowParticipantCount

This would be true if there is a line item on the receipt with more than one participant in it. Otherwise it's confusing to show.

Tags
scope

tplParams as isShowParticipantCount

$isShowTax

Is the site configured such that tax should be displayed.

public bool $isShowTax

$lineItems

Line items associated with the contribution.

public array<string|int, mixed> $lineItems
Tags
scope

tplParams

$participant

The participant record.

public array<string|int, mixed>|null $participant
Tags
scope

tokenContext as participant

$participantCount

What is the participant count, if 'specifically configured'.

public bool $participantCount

See getter notes.

Tags
scope

tplParams as participantCount

$participantID

public int $participantID
Tags
scope

tokenContext as participantId, tplParams as participantID

$participants

Line items indexed by the participant.

public array<string|int, mixed> $participants

The format is otherwise the same as lineItems which is also available on the template. The by-participant re-keying permits only including the current participant for non-primary participants and creating a by-participant table for the primary participant.

Tags
scope

tplParams as participants

$taxRateBreakdown

Tax rates paid.

public array<string|int, mixed> $taxRateBreakdown

Generally this would look like

['10.00%' => 100]

To indicate that $100 was changed for 10% tax.

Tags
scope

tplParams

$_extras

The extras are an open-ended list of fields that will be passed-through to tpl, tokenContext, etc. This is the storage of last-resort for imported values that cannot be stored by other means.

protected array<string|int, mixed> $_extras = []

Ex: ['tplParams' => ['assigned_value' => 'A', 'other_value' => 'B']]

$bcc

Additional recipients (multiple addresses).

protected string|null $bcc

Ex: '"Foo Bar" foo.bar@example.com, "Whiz Bang" whiz.bang@example.com' Ex: [['name' => 'Foo Bar', 'email' => 'foo.bar@example.com'], ['name' => 'Whiz Bang', 'email' => 'whiz.bang@example.com']]

Tags
scope

envelope

$cc

Additional recipients (multiple addresses).

protected string|null $cc

Ex: '"Foo Bar" foo.bar@example.com, "Whiz Bang" whiz.bang@example.com' Ex: [['name' => 'Foo Bar', 'email' => 'foo.bar@example.com'], ['name' => 'Whiz Bang', 'email' => 'whiz.bang@example.com']]

Tags
scope

envelope

$contactID

The contact receiving this message.

protected int|null $contactID
Tags
scope

tokenContext as contactId, tplParams as contactID

fkEntity

Contact

$participantContacts

Details of the participant contacts.

protected array<string|int, mixed> $participantContacts

This would normally be loaded but exists to allow the example to set them.

$requestedLocale

The language that was requested to be rendered.

protected string|null $requestedLocale

This may not be the rendered locale - as the requested language might be available. This is primarily for extensions to use in custom workflow messages.

The use-case is a bit like this:

  1. Your organization serves many similar locales (eg es_MX+es_CR+es_HN or en_GB+en_US+en_NZ).
  2. You want to write one message (es_MX) for several locales (es_MX+es_CR+es_HN)
  3. You want to include some conditional content that adapts the recipient's requested locale (es_CR) -- even though the template was stored as es_MX. For example your front end website has more nuanced translations than your workflow messages and you wish to redirect the user to a page on your website.
Tags
scope

tokenContext

$template

The content of the message-template.

protected array<string|int, mixed>|null $template

Ex: [ 'msg_subject' => 'Hello {contact.first_name}', 'msg_html' => '

Greetings and salutations, {contact.display_name}!

' ]

Tags
scope

envelope as messageTemplate

$templateId

protected int|null $templateId
Tags
scope

envelope as messageTemplateID

$to

The primary email recipient (single address).

protected string|null $to

Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => "Foo Bar", "email" => "foo.bar@example.com"]

The "To:" address is mapped to the "envelope" scope. The existing envelope format treats this as a pair of fields [toName,toEmail]. Consequently, we only support one "To:" address, and it uses a special import/export method.

$userEnteredHTML

Additional html to include in the receipt.

protected string $userEnteredHTML
Tags
scope

tplParams as userText

$userEnteredText

Additional text to include in the receipt.

protected string $userEnteredText
Tags
scope

tplParams as userTextPlain

Methods

__call()

Magic function to provide getters/setters.

public __call(string $method, array<string|int, mixed> $arguments) : static|mixed
Parameters
$method : string
$arguments : array<string|int, mixed>
Tags
throws
CRM_Core_Exception
Return values
static|mixed

__construct()

WorkflowMessage constructor.

public __construct([array<string|int, mixed> $imports = [] ]) : mixed
Parameters
$imports : array<string|int, mixed> = []

List of values to import. Ex: ['tplParams' => [...tplValues...], 'tokenContext' => [...tokenData...]] Ex: ['modelProps' => [...classProperties...]]

addBcc()

Add another "BCC:" address.

public addBcc(string|array<string|int, mixed> $address) : $this
Parameters
$address : string|array<string|int, mixed>

Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => "Foo Bar", "email" => "foo.bar@example.com"] Ex: [['email' => 'first@example.com'], ['email' => 'second@example.com']]

Return values
$this

addCc()

Add another "CC:" address.

public addCc(string|array<string|int, mixed> $address) : $this
Parameters
$address : string|array<string|int, mixed>

Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => "Foo Bar", "email" => "foo.bar@example.com"] Ex: [['email' => 'first@example.com'], ['email' => 'second@example.com']]

Return values
$this

getBcc()

Get the list of "Bcc:" addresses.

public getBcc([string $format = ADDRESS_EXPORT_FMT ]) : array<string|int, mixed>|string
Parameters
$format : string = ADDRESS_EXPORT_FMT

Ex: 'rfc822', 'records', 'record'

Return values
array<string|int, mixed>|string

List of addresses. Ex: 'First first@example.com, second@example.com' Ex: [['name' => 'First', 'email' => 'first@example.com'], ['email' => 'second@example.com']]

getCc()

Get the list of "Cc:" addresses.

public getCc([string $format = ADDRESS_EXPORT_FMT ]) : array<string|int, mixed>|string
Parameters
$format : string = ADDRESS_EXPORT_FMT

Ex: 'rfc822', 'records', 'record'

Return values
array<string|int, mixed>|string

List of addresses. Ex: 'First first@example.com, second@example.com' Ex: [['name' => 'First', 'email' => 'first@example.com'], ['email' => 'second@example.com']]

getContact()

public getContact() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getContribution()

public getContribution() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getCurrentParticipant()

Get the line items and tax information indexed by participant.

public getCurrentParticipant() : array<string|int, mixed>

We will likely add profile data to this too. This is so we can iterate through participants as the primary participant needs to show them all (and the others need to be able to filter).

Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

getCustomFields()

Get the custom fields for display for the participant, if not primary.

public getCustomFields() : array<string|int, mixed>
Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

getFrom()

Get the "From:" address.

public getFrom([string $format = ADDRESS_EXPORT_FMT ]) : array<string|int, mixed>|string
Parameters
$format : string = ADDRESS_EXPORT_FMT

Ex: 'rfc822', 'records', 'record'

Return values
array<string|int, mixed>|string

The "From" address. If none set, this will be empty ([]). Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => 'Foo Bar', 'email' => 'foo.bar@example.com']

getGroupName()

public getGroupName() : string|null

It is not recommended that new things depend on the group-name. However, the plumbing still passes-through the group-name.

Return values
string|null

getIsShowLineItems()

Get bool for whether a line item breakdown be displayed.

public getIsShowLineItems() : bool
Tags
noinspection

PhpUnused

Return values
bool

getIsShowLineSubtotal()

Is it a good idea to show the line item subtotal.

public getIsShowLineSubtotal() : bool

This would be true if at least one line has a quantity > 1. Otherwise it is very repetitive.

Tags
throws
CRM_Core_Exception
Return values
bool

getIsShowParticipantCount()

It is a good idea to show the participant count column.

public getIsShowParticipantCount() : bool

This would be true if there is a line item on the receipt with more than one participant in it. Otherwise it's confusing to show.

Tags
throws
CRM_Core_Exception
Return values
bool

getParticipant()

Get the participant record.

public getParticipant() : array<string|int, mixed>
Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

getParticipantCount()

Get the count of participants, where count is used in the line items.

public getParticipantCount() : mixed

This might be the case where a line item represents a table of 6 people.

Where the price field value does not record the participant count we ignore.

This lack of specifying it is a bit unclear but seems to be 'presumed 1'. From the templates point of view it is not information to present if not configured.

Tags
throws
CRM_Core_Exception

getParticipants()

Get the line items and tax information indexed by participant.

public getParticipants() : array<string|int, mixed>

We will likely add profile data to this too. This is so we can iterate through participants as the primary participant needs to show them all (and the others need to be able to filter).

Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

getPrimaryParticipantID()

public getPrimaryParticipantID() : int
Return values
int

getReplyTo()

Get the "Reply-To:" address.

public getReplyTo([string $format = ADDRESS_EXPORT_FMT ]) : array<string|int, mixed>|string
Parameters
$format : string = ADDRESS_EXPORT_FMT

Ex: 'rfc822', 'records', 'record'

Return values
array<string|int, mixed>|string

The "From" address. If none set, this will be empty ([]). Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => 'Foo Bar', 'email' => 'foo.bar@example.com']

getRequestedLocale()

Get the requested locale.

public getRequestedLocale() : string

This may differ from the rendered locale (e.g. if a translation is not available). It is not used in core but extensions may leverage this information.

Return values
string

getTaxRateBreakdown()

Get the line items.

public getTaxRateBreakdown() : array<string|int, mixed>
Tags
throws
CRM_Core_Exception
noinspection

PhpUnused

Return values
array<string|int, mixed>

getTo()

Get the list of "To:" addresses.

public getTo([string $format = ADDRESS_EXPORT_FMT ]) : array<string|int, mixed>|string

Note: This returns only

Parameters
$format : string = ADDRESS_EXPORT_FMT

Ex: 'rfc822', 'records', 'record'

Return values
array<string|int, mixed>|string

Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => 'Foo Bar', 'email' => 'foo.bar@example.com']

resolveContent()

public resolveContent() : array<string|int, mixed>
Return values
array<string|int, mixed>

setBcc()

Set the "BCC:" list.

public setBcc(string|array<string|int, mixed> $address) : $this
Parameters
$address : string|array<string|int, mixed>

Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => "Foo Bar", "email" => "foo.bar@example.com"] Ex: [['email' => 'first@example.com'], ['email' => 'second@example.com']]

Return values
$this

setCc()

Set the "CC:" list.

public setCc(string|array<string|int, mixed> $address) : $this
Parameters
$address : string|array<string|int, mixed>

Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => "Foo Bar", "email" => "foo.bar@example.com"] Ex: [['email' => 'first@example.com'], ['email' => 'second@example.com']]

Return values
$this

setContact()

public setContact([array<string|int, mixed>|null $contact = ]) : $this
Parameters
$contact : array<string|int, mixed>|null =
Return values
$this

setContactID()

public setContactID([int|null $contactID = ]) : $this
Parameters
$contactID : int|null =
Return values
$this

setContribution()

Set contribution object.

public setContribution(array<string|int, mixed> $contribution) : $this
Parameters
$contribution : array<string|int, mixed>
Return values
$this

setFinancialTrxn()

Set contribution object.

public setFinancialTrxn(array<string|int, mixed> $financialTrxn) : $this
Parameters
$financialTrxn : array<string|int, mixed>
Return values
$this

setFrom()

public setFrom(string|array<string|int, mixed> $address) : $this
Parameters
$address : string|array<string|int, mixed>

Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => "Foo Bar", "email" => "foo.bar@example.com"]

Return values
$this

setLocale()

public setLocale(string|null $locale) : $this
Parameters
$locale : string|null
Return values
$this

setOrder()

Set order object.

public setOrder(CRM_Financial_BAO_Order $order) : $this

Note this is only supported for core use (specifically in example work flow) as the contract might change.

Parameters
$order : CRM_Financial_BAO_Order
Return values
$this

setParticipant()

Set participant object.

public setParticipant(array<string|int, mixed> $participant) : $this
Parameters
$participant : array<string|int, mixed>
Return values
$this

setReplyTo()

public setReplyTo(string|array<string|int, mixed> $address) : $this
Parameters
$address : string|array<string|int, mixed>

Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => "Foo Bar", "email" => "foo.bar@example.com"]

Return values
$this

setRequestedLocale()

Set the requested locale.

public setRequestedLocale(string|null $requestedLocale) : $this
Parameters
$requestedLocale : string|null
Return values
$this

setTo()

public setTo(string|array<string|int, mixed> $address) : $this
Parameters
$address : string|array<string|int, mixed>

Ex: '"Foo Bar" foo.bar@example.com' Ex: ['name' => "Foo Bar", "email" => "foo.bar@example.com"]

Return values
$this

setUserEnteredHTML()

public setUserEnteredHTML([string $html = ]) : $this
Parameters
$html : string =
Return values
$this

setUserEnteredText()

public setUserEnteredText([string $text = ]) : $this
Parameters
$text : string =
Return values
$this

validate()

Determine if the data for this workflow message is complete/well-formed.

public validate() : array<string|int, mixed>
Tags
see
WorkflowMessageInterface::validate()
Return values
array<string|int, mixed>

A list of errors and warnings. Each record defines

  • severity: string, 'error' or 'warning'
  • fields: string[], list of fields implicated in the error
  • name: string, symbolic name of the error/warning
  • message: string, printable message describing the problem

exportExtraEnvelope()

Get a list of key-value pairs to include the Smarty template context.

protected exportExtraEnvelope(array<string|int, mixed> &$export) : void
Parameters
$export : array<string|int, mixed>

Modifiable list of export-values.

exportExtraEnvelope_toAddress()

Plugin to `WorkflowMessageInterface::export()` and handle toEmail/toName.

protected exportExtraEnvelope_toAddress(array<string|int, mixed> &$values) : void
Parameters
$values : array<string|int, mixed>
Tags
see
ReflectiveWorkflowTrait::export

exportExtraModelProps()

Get a list of key-value pairs to include the array-coded version of the class.

protected exportExtraModelProps(array<string|int, mixed> &$export) : void
Parameters
$export : array<string|int, mixed>

Modifiable list of export-values.

exportExtraTokenContext()

Specify any tokens that should be exported as smarty variables.

protected exportExtraTokenContext(array<string|int, mixed> &$export) : void
Parameters
$export : array<string|int, mixed>

exportExtraTplParams()

Extra variables to be exported to smarty based on being calculated.

protected exportExtraTplParams(array<string|int, mixed> &$export) : void

We export isShowTax to denote whether invoicing is enabled but hopefully at some point we will separate the assumption that invoicing and tax are a package.

Parameters
$export : array<string|int, mixed>
Tags
noinspection

PhpUnused

getCustomFieldDisplay()

Given an entity loaded through apiv4 return an array of custom fields for display.

protected getCustomFieldDisplay(array<string|int, mixed> $entityRecord, string $entity[, array<string|int, mixed> $filters = [] ]) : array<string|int, mixed>
Parameters
$entityRecord : array<string|int, mixed>
$entity : string
$filters : array<string|int, mixed> = []
Tags
throws
UnknownCurrencyException
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

getFieldsByFormat()

protected getFieldsByFormat(mixed $format) : array<string|int, mixed>|null
Parameters
$format : mixed
Return values
array<string|int, mixed>|null

getFieldsToLoadForParticipant()

Get the participant fields we need to load.

protected getFieldsToLoadForParticipant() : array<string|int, mixed>
Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

getFilteredCustomFields()

Get a list of custom fields that are 'viewable'.

protected getFilteredCustomFields(string $entity[, array<string|int, mixed> $extendsEntity = [] ]) : array<string|int, mixed>

Viewable is defined as

  • is_public = TRUE (group level)
  • is_view = FALSE (field level). This indicate a calculated field (which could be private fundraising info) and has not been historically visible as it is not on the edit form.
  • is not acl blocked for the current user (this is used in back office context so the user is an admin not the recipient).
Parameters
$entity : string
$extendsEntity : array<string|int, mixed> = []
Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

getMagicProperties()

Get a list of class properties for which magic methods are supported.

protected static getMagicProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>

List of supported properties, keyed by property name. Array(string $propertyName => bool $true).

importExtraEnvelope()

Given an import-array (in the envelope-format), pull out any interesting values.

protected importExtraEnvelope(array<string|int, mixed> &$values) : void
Parameters
$values : array<string|int, mixed>

List of import-values. Optionally, unset values that you have handled or blocked.

importExtraEnvelope_toAddress()

Plugin to `WorkflowMessageInterface::import()` and handle toEmail/toName.

protected importExtraEnvelope_toAddress(array<string|int, mixed> &$values) : void
Parameters
$values : array<string|int, mixed>
Tags
see
ReflectiveWorkflowTrait::import

importExtraModelProps()

Given an import-array (in the class-format), pull out any interesting values.

protected importExtraModelProps(array<string|int, mixed> &$values) : void
Parameters
$values : array<string|int, mixed>

List of import-values. Optionally, unset values that you have handled or blocked.

importExtraTokenContext()

Given an import-array (in the token-context-format), pull out any interesting values.

protected importExtraTokenContext(array<string|int, mixed> &$values) : void
Parameters
$values : array<string|int, mixed>

List of import-values. Optionally, unset values that you have handled or blocked.

importExtraTplParams()

Given an import-array (in the tpl-format), pull out any interesting values.

protected importExtraTplParams(array<string|int, mixed> &$values) : void
Parameters
$values : array<string|int, mixed>

List of import-values. Optionally, unset values that you have handled or blocked.

validateExtra_localization()

protected validateExtra_localization(mixed &$errors) : mixed
Parameters
$errors : mixed

formatAddress()

Convert an address to the desired format.

private formatAddress(string $newFormat, array<string|int, mixed>|string $mixed) : array<string|int, mixed>|string|null
Parameters
$newFormat : string

Ex: 'rfc822', 'records', 'record'

$mixed : array<string|int, mixed>|string
Return values
array<string|int, mixed>|string|null

getOrder()

Get order, if available.

private getOrder() : CRM_Financial_BAO_Order|null

The order is used within the class to calculate line items etc.

Return values
CRM_Financial_BAO_Order|null

isCiviContributeEnabled()

private isCiviContributeEnabled() : bool
Return values
bool

        
On this page

Search results