Use this API to create, update and delete the attendees of events.
Methods
Invoke via \Components\Marketing\Events\Attendees::method() Click a method name to copy it.
- `
array|null
cancelRegistration($arrAttendee)`
Cancel a registration made online for a free event.
The registration's root row is kept with the status 'no_rsvp' and the cancellation time recorded, so the contact can register again and the cancellation stays visible to administrators. Registered guests and anyone attending in the root's place are removed - their contacts never registered themselves, and on an invite-only event a leftover row would be an invitation. The contact's sub-event registrations are cancelled too, except for sub-events that have started.
Parameters:
- $arrAttendee
mixed
Return
The cancelled root attendee, or null when the root was a guest (whose row is removed)
- `
\Iterator
dbGetAllIterable($arrQuery)`
Returns the raw rows dbGetAll() would return as an iterator, without building them all into an array
The dbGetAll() counterpart of getAllIterable(), for scans over every stored row of a large table (eg: the site-wide content scans in \Framework\Developer\Refactoring). Rows are as stored - JSON fields are not decoded - and are not entity-cached. Because it bypasses getAll(), components that override getAll() are iterated; search queries and components overriding dbGetAll() are refused.
Returns the entities getAll() would return as an iterator, without building them all into an array
For result sets too large to hold as arrays (eg: every recipient of a marketing send) - only the database driver's compact buffer of the result is held, a fraction of getAll()'s memory. Runs the same SQL as getAll(), and runs it now, as getAll() would; rows are decoded as you iterate.
Search queries are not supported, rows are not entity-cached, and components that override getAll() or dbGetAll() (eg: merging in defaults) are refused rather than iterated without their extra rows.
Return all Attendees for a particular event, joined with their Contact rows.
This was implemented here because a searchbox didn't seem to want to call any page-level funcions.
Returns whether the attendee has a registration they can look at and change online - what decides whether emails carry a "change or cancel" link. Paid registrations qualify: guests and sub-events can still be changed.
Return the attendee for a contact when the supplied RSVP reference matches their row - the identity check used by the emailed success, calendar and manage links for visitors who are not logged in.
Return the attendee row that is actually attending for a registration: the root itself when it is attending or maybe, otherwise whoever is attending in its place, or null when nobody is registered.
Parameters:
- $arrAttendee
mixed
Return
array|null
- `
bool
getRegistrationChangesClosed($arrEvent)`
Returns whether attendees can no longer change or cancel registrations for the event online. Changes stay open until the event starts, and beyond that for as long as the public RSVP cutoff is open - an event with later sub-events keeps taking registration changes after the parent has begun (see
Events::getRsvpCutoffTimestamp()).
Parameters:
- $arrEvent
mixed
Return
bool
- `
bool
getRegistrationHasPayment($arrAttendee)`
Returns whether any part of a registration was paid for: the event sells a ticket, or any row in the group (the attendee, alternates, guests, sub-event registrations) is linked to a sale item or a paid sub-event. Refunds are not automated, so such registrations are not cancelled online.
Parameters:
- $arrAttendee
mixed
Return
bool
- `
array|null
getRegistrationRoot($arrAttendee)`
Return the attendee row a registration belongs to. Someone attending in an invitee's place (an alternate, or a company's representative) is a dependant of that invitee's row, which is where the registration is managed.
Parameters:
- $arrAttendee
mixed
Return
array|null
- `
array
getRegistrationRows($arrAttendee)`
Return every attendee row that belongs to a registration, dependants first and the given row last: alternates (with everything of theirs), registered guests (with their own sub-event registrations), and the contact's registrations for sub-events that have not started - registration for a started sub-event is closed in both directions, like on the RSVP form. This is the set a cancellation writes, and what the payment and check-in blockers scan.