CRM_Event_WorkflowMessage_ParticipantTrait
Trait for participant workflow classes.
Table of Contents
Properties
- $currentParticipant : array<string|int, mixed>
- The current participant (if there are multiple this is the one being emailed).
- $eventID : int
- $isPrimary : bool
- Is this the primary participant.
- $isShowParticipantCount : bool
- Should a participant count column be shown.
- $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.
- $participantContacts : array<string|int, mixed>
- Details of the participant contacts.
Methods
- 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.
- getIsShowParticipantCount() : bool
- It is a good idea to show the participant count column.
- 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
- setEventID() : CRM_Event_WorkflowMessage_ParticipantTrait
- setParticipant() : $this
- Set participant object.
- setParticipantContacts() : CRM_Event_WorkflowMessage_ParticipantTrait
- setParticipantID() : mixed
- getFieldsToLoadForParticipant() : array<string|int, mixed>
- Get the participant fields we need to load.
- getParticipantContact() : mixed
- isCiviContributeEnabled() : bool
Properties
$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
$isPrimary
Is this the primary participant.
public
bool
$isPrimary
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
$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
$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.
Methods
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
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
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
boolgetParticipant()
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
intsetEventID()
public
setEventID(int $eventID) : CRM_Event_WorkflowMessage_ParticipantTrait
Parameters
- $eventID : int
Return values
CRM_Event_WorkflowMessage_ParticipantTraitsetParticipant()
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
getFieldsToLoadForParticipant()
Get the participant fields we need to load.
protected
getFieldsToLoadForParticipant() : array<string|int, mixed>
Return values
array<string|int, mixed>getParticipantContact()
private
getParticipantContact([mixed $participantID = NULL ]) : mixed
Parameters
- $participantID : mixed = NULL
Tags
isCiviContributeEnabled()
private
isCiviContributeEnabled() : bool