CRM_Event_WorkflowMessage_ParticipantTrait uses trait:short, trait:short
Trait for participant workflow classes.
Table of Contents
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).
- $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.
- $profilesAdditionalParticipants : array<string|int, mixed>
- $profilesPostForm : array<string|int, mixed>
- $profilesPreForm : array<string|int, mixed>
- $profileTitlesPostForm : array<string|int, mixed>
- $profileTitlesPreForm : array<string|int, mixed>
- $taxRateBreakdown : array<string|int, mixed>
- Tax rates paid.
- $note : string
- The note, if any, from the session.
- $participantContacts : array<string|int, mixed>
- Details of the participant contacts.
- $profiles : array<string|int, mixed>
- The profiles array is not currently assigned / used but might be saner than the ones that are.
- $order : CRM_Financial_BAO_Order
Methods
- getContribution() : array<string|int, mixed>|null
- getCurrentParticipant() : array<string|int, mixed>
- Get the line items and tax information indexed by participant.
- getEventID() : int
- 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.
- getParticipant() : array<string|int, mixed>
- Get the participant record.
- getParticipantCount() : mixed
- Get the count of participants, where count is used in the line items.
- getParticipantID() : int
- getParticipants() : array<string|int, mixed>
- Get the line items and tax information indexed by participant.
- getPrimaryParticipantID() : int
- getProfiles() : array<string|int, mixed>
- getProfilesAdditionalParticipants() : array<string|int, mixed>
- getProfilesPostForm() : array<string|int, mixed>
- getProfilesPreForm() : array<string|int, mixed>
- getProfileTitlesPostForm() : array<string|int, mixed>
- getProfileTitlesPreForm() : array<string|int, mixed>
- getTaxRateBreakdown() : array<string|int, mixed>
- Get the line items.
- setContribution() : $this
- Set contribution object.
- setEventID() : CRM_Event_WorkflowMessage_ParticipantTrait
- setFinancialTrxn() : $this
- Set contribution object.
- setOrder() : $this
- Set order object.
- setParticipant() : $this
- Set participant object.
- setParticipantContacts() : CRM_Event_WorkflowMessage_ParticipantTrait
- setParticipantID() : mixed
- 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.
- getFieldsToLoadForParticipant() : array<string|int, mixed>
- Get the participant fields we need to load.
- getOrder() : CRM_Financial_BAO_Order|null
- Get order, if available.
- getParticipantContact() : mixed
- getProfilesByPlacement() : array<string|int, mixed>
- isCiviContributeEnabled() : bool
Properties
$contribution
The contribution.
public
array<string|int, mixed>|null
$contribution
Tags
$contributionID
public
int
$contributionID
Tags
$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
$eventID
public
int
$eventID
Tags
$financialTrxn
Optional financial transaction (payment).
public
array<string|int, mixed>|null
$financialTrxn
Tags
$financialTrxnID
public
int
$financialTrxnID
Tags
$isPrimary
Is this the primary participant.
public
bool
$isPrimary
Tags
$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
$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
$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
$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
$participant
The participant record.
public
array<string|int, mixed>|null
$participant
Tags
$participantCount
What is the participant count, if 'specifically configured'.
public
bool
$participantCount
See getter notes.
Tags
$participantID
public
int
$participantID
Tags
$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
$profilesAdditionalParticipants
public
array<string|int, mixed>
$profilesAdditionalParticipants
Tags
$profilesPostForm
public
array<string|int, mixed>
$profilesPostForm
Tags
$profilesPreForm
public
array<string|int, mixed>
$profilesPreForm
Tags
$profileTitlesPostForm
public
array<string|int, mixed>
$profileTitlesPostForm
Tags
$profileTitlesPreForm
public
array<string|int, mixed>
$profileTitlesPreForm
Tags
$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
$note
The note, if any, from the session.
protected
string
$note
= ''
As multiple notes can be attached to a participant records we only want to render a note as part of the profile if the user entered it in the form submission.
$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.
$profiles
The profiles array is not currently assigned / used but might be saner than the ones that are.
protected
array<string|int, mixed>
$profiles
$order
private
CRM_Financial_BAO_Order
$order
Methods
getContribution()
public
getContribution() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetCurrentParticipant()
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
Return values
array<string|int, mixed>getEventID()
public
getEventID() : int
Return values
intgetIsPrimary()
Is the participant the primary participant.
public
getIsPrimary() : bool
Tags
Return values
boolgetIsShowLineItems()
Get bool for whether a line item breakdown be displayed.
public
getIsShowLineItems() : bool
Tags
Return values
boolgetIsShowLineSubtotal()
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
Return values
boolgetIsShowParticipantCount()
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
Return values
boolgetLineItems()
Get the line items.
public
getLineItems() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getParticipant()
Get the participant record.
public
getParticipant() : array<string|int, mixed>
Tags
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
getParticipantID()
public
getParticipantID() : int
Return values
intgetParticipants()
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
Return values
array<string|int, mixed>getPrimaryParticipantID()
public
getPrimaryParticipantID() : int
Return values
intgetProfiles()
public
getProfiles() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getProfilesAdditionalParticipants()
public
getProfilesAdditionalParticipants() : array<string|int, mixed>
Return values
array<string|int, mixed>getProfilesPostForm()
public
getProfilesPostForm() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getProfilesPreForm()
public
getProfilesPreForm() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getProfileTitlesPostForm()
public
getProfileTitlesPostForm() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getProfileTitlesPreForm()
public
getProfileTitlesPreForm() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getTaxRateBreakdown()
Get the line items.
public
getTaxRateBreakdown() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>setContribution()
Set contribution object.
public
setContribution(array<string|int, mixed> $contribution) : $this
Parameters
- $contribution : array<string|int, mixed>
Return values
$thissetEventID()
public
setEventID(int $eventID) : CRM_Event_WorkflowMessage_ParticipantTrait
Parameters
- $eventID : int
Return values
CRM_Event_WorkflowMessage_ParticipantTraitsetFinancialTrxn()
Set contribution object.
public
setFinancialTrxn(array<string|int, mixed> $financialTrxn) : $this
Parameters
- $financialTrxn : array<string|int, mixed>
Return values
$thissetOrder()
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
$thissetParticipant()
Set participant object.
public
setParticipant(array<string|int, mixed> $participant) : $this
Parameters
- $participant : array<string|int, mixed>
Return values
$thissetParticipantContacts()
public
setParticipantContacts(array<string|int, mixed> $participantContacts) : CRM_Event_WorkflowMessage_ParticipantTrait
Parameters
- $participantContacts : array<string|int, mixed>
Return values
CRM_Event_WorkflowMessage_ParticipantTraitsetParticipantID()
public
setParticipantID(int $participantID) : mixed
Parameters
- $participantID : int
Tags
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
getFieldsToLoadForParticipant()
Get the participant fields we need to load.
protected
getFieldsToLoadForParticipant() : array<string|int, mixed>
Return values
array<string|int, mixed>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|nullgetParticipantContact()
private
getParticipantContact([mixed $participantID = null ]) : mixed
Parameters
- $participantID : mixed = null
Tags
getProfilesByPlacement()
private
getProfilesByPlacement(string $placement) : array<string|int, mixed>
Parameters
- $placement : string
-
pre or post.
Tags
Return values
array<string|int, mixed>isCiviContributeEnabled()
private
isCiviContributeEnabled() : bool