CRM_Event_Form_EventFormTrait
Trait implements getContactValue + overridable getContactID functions.
These are commonly used on forms - although getContactID() would often
be overridden. By using these functions it is not necessary to know
if the Contact ID has already been defined as getContactID()
will retrieve
them form the values available (unless it is yet to be created).
Table of Contents
Methods
- getEventID() : int|null
- Get the selected Event ID.
- getEventValue() : mixed
- Get the value for a field relating to the event.
- getParticipantID() : int|null
- Get id of participant being acted on.
- getParticipantValue() : mixed
- Get a value from the participant being acted on.
- isEventFull() : bool
- Is the event full already.
Methods
getEventID()
Get the selected Event ID.
public
getEventID() : int|null
Tags
Return values
int|nullgetEventValue()
Get the value for a field relating to the event.
public
getEventValue(string $fieldName) : mixed
All values returned in apiv4 format. Escaping may be required.
Parameters
- $fieldName : string
Tags
getParticipantID()
Get id of participant being acted on.
public
getParticipantID() : int|null
Return values
int|nullgetParticipantValue()
Get a value from the participant being acted on.
public
getParticipantValue(string $fieldName) : mixed
All values returned in apiv4 format. Escaping may be required.
Parameters
- $fieldName : string
Tags
isEventFull()
Is the event full already.
public
isEventFull() : bool
This function may be calculated by v4 api in time, in which case the function will call that instead but will remain available.