Documentation

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
scope

tplParams as participant

$eventID

public int $eventID
Tags
scope

tokenContext as eventId, tplParams as eventID

$isPrimary

Is this the primary participant.

public bool $isPrimary
Tags
scope

tplParams as isPrimary

$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

$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

$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
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

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

setParticipant()

Set participant object.

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

getFieldsToLoadForParticipant()

Get the participant fields we need to load.

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

isCiviContributeEnabled()

private isCiviContributeEnabled() : bool
Return values
bool

        
On this page

Search results