Broarm\EventTickets\Model\Attendee
Class Attendee
Synopsis
class Attendee
extends DataObject
{
- // members
- private static string $table_name = 'EventTickets_Attendee';
- private static bool $qr_as_link = false;
- private static array $default_fields = ;
- private static array $table_fields = ;
- private static array $db = ;
- private static string $default_sort = 'Created DESC';
- private static array $indexes = ;
- private static array $has_one = ;
- private static array $many_many = ;
- private static array $many_many_extraFields = ;
- private static array $summary_fields = ;
- protected static array $cachedFields = ;
- // methods
- public void getCMSFields()
- public void onBeforeWrite()
- public void onAfterWrite()
- public void onBeforeDelete()
- public bool isValid()
- public Folder|DataObject|null fileFolder()
- public string|null getFirstName()
- public string|null getSurname()
- public string|null getEmail()
- public string|null getName()
- public mixed|null|string getUserField()
- protected void getFieldCacheKey()
- public ArrayList getTableFields()
- public string singular_name()
- public string generateTicketCode()
- public string getQRCode()
- public string getCheckInLink()
- public void checkIn()
- public void canCheckOut()
- public void checkOut()
- public void canView()
- public void canEdit()
- public void canDelete()
- public void canCreate()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $db
- $default_fields
- $default_sort
- $has_one
- $indexes
- $many_many
- $many_many_extraFields
- $qr_as_link
—
Broarm\EventTickets\Model\bool
Set this to true when you want to have a QR code that opens the check in page and validates the code. - $summary_fields
- $table_fields
- $table_name
protected
- $cachedFields
Methods
protected
public
- canCheckOut()
- canCreate()
- canDelete()
- canEdit()
- canView()
- checkIn() — Check the attendee out
- checkOut() — Check the attendee in
- fileFolder() — Create the folder for the qr code and ticket file
- generateTicketCode() — Generate a unique ticket id Serves as the base for the QR code and ticket file
- getCMSFields()
- getCheckInLink() — Get the checkin link
- getEmail() — Utility method for fetching the default field, Email, value
- getFirstName() — Utility method for fetching the default field, FirstName, value
- getName() — Get the combined first and last nave for display on the ticket and attendee list
- getQRCode() — Get a base64 encoded QR png code
- getSurname() — Utility method for fetching the default field, Surname, value
- getTableFields() — Get the table fields for this attendee
- getUserField() — Get the user field and store it in a static cache todo: add a cache that saves the field value on save and retrieves the values here, dumb, so empty fields don't trigger queries
- isValid() — Check if the attendee has all required fields set
- onAfterWrite()
- onBeforeDelete() — Delete any stray files before deleting the object
- onBeforeWrite() — Set the title and ticket code before writing
- singular_name() — Get the unnamespaced singular name for display in the CMS