\Marketing\Events
Templating
Global Functions
Website
\Components\Website\Designs \Components\Website\Media \Components\Website\Pages \Components\Website\Pages\Forms \Components\Website\Posts \Components\Website\Posts\Categories
Customers
\Components\Customers\Contacts \Components\Customers\Contacts\Relationships \Components\Customers\Contacts\Relationships\Types \Components\Customers\Groups
Marketing
\Components\Marketing\EmailMarketing \Components\Marketing\Events \Components\Marketing\Events\Attendees \Components\Marketing\Events\Categories \Components\Marketing\Events\Locations \Components\Marketing\SMSMarketing
Commerce
\Components\Commerce\Carts \Components\Commerce\Carts\Current \Components\Commerce\Discounts \Components\Commerce\Products \Components\Commerce\Products\Brands \Components\Commerce\Products\Categories \Components\Commerce\Products\Inventory \Components\Commerce\Sales \Components\Commerce\Sales\Items \Components\Commerce\Sales\Receipts \Components\Commerce\Sales\Receipts\Allocations
Settings
\Components\Settings\Administrators \Components\Settings\CustomFields \Components\Settings\Domains
Other Apps
\Components\Website\Comments \Components\Commerce\Affiliates \Components\Commerce\Affiliates\Administrators \Components\Commerce\Affiliates\Commissions \Components\Commerce\Affiliates\Payments \Components\Commerce\RecurringSales \Components\Commerce\RecurringSales\StoredCards
Framework
\Framework\Caching \Framework\Data\Util \Framework\DOM\CurrentContext \Framework\HTML\Converters \Framework\HTTP\Cookies \Framework\HTTP\Redirection \Framework\HTTP\Request \Framework\HTTP\Session \Framework\HTTP\UserAgent \Framework\I18N\CompanyTypes \Framework\I18N\Countries \Framework\I18N\Languages

Events

Use this API to create, update and delete marketing events.

Methods

Invoke via \Components\Marketing\Events::method()
Click a method name to copy it.
- ` array canContactRSVPForEvent($iEventId, $iContactId) `
Is the specified contact allowed to RSVP for the specified Event
Parameters:
- $iEventId
mixed
- $iContactId
mixed
Return
array
- ` array customFieldsForEvent($iEventId, $bPublicOnly, $bGuest) `
The Attendee table contains all custom fields for all events, but specific events make use of different columns. Return the relevent custom fields for a particular Event.
Parameters:
- $iEventId
mixed
- $bPublicOnly
mixed
- $bGuest
mixed
Return
Rows in the configuration custom fields table.
- ` bool eventHasAvailableCapacity($iEventId) `
Returns true if the event has available capacity.
If the event is unrestricted or has no capacity set, it will return true.
Parameters:
- $iEventId
mixed
Return
bool
- ` bool eventRSVPDeadlinePassed($iEventId) `
Returns true if the RSVP deadline for the given event has passed
Parameters:
- $iEventId
mixed
Return
bool
- ` array|null filterByUriSuffix($strUriSuffix) `
Gets an event entity from a URI suffix (e.g. my-event)
Parameters:
- $strUriSuffix
mixed
Return
array|null
- ` string|null generateSearchDescription($arrEntity) `
Generates the SEO search description from event content
Parameters:
- $arrEntity
mixed
Return
string|null
- ` string|null generateSearchKeywords($arrEntity) `
Generates SEO keywords from event content
Parameters:
- $arrEntity
mixed
Return
string|null
- ` string|null generateUniqueUriSuffix($arrEntity) `
Generates a unique URI suffix by cycling through formats until no collision
Parameters:
- $arrEntity
mixed
Return
string|null
- ` string|null generateUriSuffix($arrEntity, $strFormat) `
Generates the page URI suffix (SEO slug URI for the event)
Parameters:
- $arrEntity
mixed
- $strFormat
mixed
Return
string|null
- ` array get($iEventId) `
Gets a record from the database
Parameters:
- $iEventId
int unsigned
A record's event_id
Return
- ` array getAll($arrQuery) `
Return a set of records from the database
Parameters:
- $arrQuery
mixed
Return
Array of Events
- ` array getAllForCategory($arrCategoryIds, $arrQuery) `
Return all the marketing_events that belong to specific categories.
Parameters:
- $arrCategoryIds
mixed
- $arrQuery
mixed
Return
Array of Events
- ` array getAllForContactAttending($iContactId, $arrQuery) `
Return all the current events that a contact is attending.
Parameters:
- $iContactId
mixed
- $arrQuery
mixed
Return
Array of Events
- ` array getAllForContactUpcoming($iContactId, $arrQuery) `
Return all of the current events that a contact is attending.
Parameters:
- $iContactId
mixed
- $arrQuery
mixed
Return
Array of Events
- ` mixed getColumn($iEventId, $strColumn) `
Gets a single field from a record
Parameters:
- $iEventId
int unsigned
A record's event_id
- $strColumn
mixed
Return
mixed
- ` int getCount($arrFilter) `
Returns the number of records in the database (matching the filter if specified)
Parameters:
- $arrFilter
mixed
Return
int
- ` array|null getCurrentPageEvent() `
Returns the current event if the current page is an event page, or null otherwise
Return
The event entity if on an event page, null otherwise
- ` float|null getEventPrice($iEventId) `
If the event is associated with a product, return the price of the product.
Parameters:
- $iEventId
mixed
Return
float|null
- ` string getEventSuccessUrl($arrEvent, $arrAttendee, $bAbsolute) `
Returns the public URL for an event's success page
Parameters:
- $arrEvent
mixed
- $arrAttendee
mixed
- $bAbsolute
mixed
Return
string
- ` string getEventUrl($arrEvent) `
Returns the public URL for an event's RSVP form page
Parameters:
- $arrEvent
mixed
Return
string
- ` array|null getFromPageURI($strPageURI) `
Retrieves an event from its page URI
Parameters:
- $strPageURI
mixed
Return
array|null
- ` void getFromProductId($iProductId) `
Retrieves the event corresponding to an event product
Parameters:
- $iProductId
mixed
- ` bool delete($iEventId, $bDeleteMedia) `
Deletes a record from the database
Parameters:
- $iEventId
int unsigned
A record's event_id
- $bDeleteMedia
mixed
Return
Returns true if record existed and was deleted, otherwise false
- ` string getPublicUrlPath() `
Returns the public URL path for events (e.g. /events-rsvp/)
Return
string
- ` array getUriFormats() `
Returns the available URL format patterns for event URI generation
Return
Array of format strings
- ` array|null getUriSuffixCollision($arrEntity) `
Gets the event that has a colliding URI suffix, or null if available
Parameters:
- $arrEntity
mixed
Return
The colliding event, or null if suffix is available
- ` bool isContactAllowedInEvent($iEventId, $iContactId) `
Is the specified contact allowed to be added to the specified Event
Parameters:
- $iEventId
mixed
- $iContactId
mixed
Return
Return true if allowed, false if not.
- ` bool isContactAttending($iEventId, $iContactId, $bIncludeMaybe) `
Return true if the specified contact is registered to attend the specified event.
Parameters:
- $iEventId
mixed
- $iContactId
mixed
- $bIncludeMaybe
mixed
Return
bool
- ` bool isContactCompanyAllowedInEvent($iEventId, $iContactId) `
Is the specified contact allowed to be added to the specified Event
Parameters:
- $iEventId
mixed
- $iContactId
mixed
Return
Return true if allowed, false if not.
- ` string renderEventDate($arrEvent, $bIncludeTZ) `
Return the event date with the format: (On the same day) 1 Sep 2016 2:00pm - 4:00pm. (Different day) 1 Sep 2016 2:00pm - 3 Sep 2016 3:00pm.
Parameters:
- $arrEvent
mixed
- $bIncludeTZ
mixed
Return
string
- ` string renderEventPrice($iEventId) `
Render the price of an event, if it has one.
Parameters:
- $iEventId
mixed
Return
string
- ` string renderTime($arrEvent, $iTime, $strDateFormat, $strTimeFormat) `
Return $iTime formatted into a human-readable string, in the timezone specified for this event.
Parameters:
- $arrEvent
mixed
- $iTime
mixed
- $strDateFormat
mixed
- $strTimeFormat
mixed
Return
string
- ` string|int save($arrEntity) `
Saves a record into the database
Parameters:
- $arrEntity
mixed
Return
string|int
- ` void saveColumn($iEventId, $strColumn, $strValue) `
Saves a specific column of a row into a database
Parameters:
- $iEventId
int unsigned
A record's event_id
- $strColumn
mixed
- $strValue
mixed
- ` array search($strSearch, $arrQuery) `
Performs a search
Parameters:
- $strSearch
mixed
- $arrQuery
mixed
Return
Array of Events that match the search query.
- ` boolean uriSuffixIsAvailable($arrEntity) `
Determines if a URI suffix for a given entity is available
Parameters:
- $arrEntity
mixed
Return
boolean

Database Fields

The following fields are used when retrieving and saving entities:
- `event_id`
int unsigned (10)
- `event_title`
string (255)
- `event_start_datetime`
datetime
- `event_end_datetime`
datetime
- `event_timezone`
string (255)
- `event_capacity`
int (10)
- `event_rsvp_deadline_datetime`
datetime
- `event_capacity_restrictive`
0 or 1
- `event_attendance_via_qrcode`
0 or 1
- `event_location_id`
int (10)
- `event_description`
string (16777215)
- `event_custom_fields`
string (16777215)
- `event_allow_alternate_rsvp`
0 or 1
- `event_allow_guest_rsvp`
0 or 1
- `event_attendee_company_rsvp`
0 or 1
- `event_linked_product`
int (10)
- `event_enable_product_order_options`
0 or 1
- `event_linked_guest_product`
int (10)
- `event_attending_count`
int unsigned (10)
- `event_attending_checkedin_count`
int unsigned (10)
- `event_notattending_count`
int unsigned (10)
- `event_maybe_count`
int unsigned (10)
- `event_norsvp_count`
int unsigned (10)
- `event_allow_maybe_rsvp`
0 or 1
Default value: 1
- `event_requires_invitation`
tinyint (4)
Default value: 1
- `event_require_phone`
0 or 1
Default value: 1
- `event_guests_price`
decimal unsigned (10,4)
- `event_guests_custom_fields`
string (16777215)
- `event_uri_suffix`
string (255)
- `event_uri_suffix_is_overridden`
0 or 1
- `event_search_title`
string (255)
- `event_search_title_is_overridden`
0 or 1
- `event_search_description`
string (255)
- `event_search_description_is_overridden`
0 or 1
- `event_search_keywords`
string (255)
- `event_search_keywords_is_overridden`
0 or 1
- `event_search_noindex`
0 or 1
- `event_search_nofollow`
0 or 1
- `event_created_datetime`
datetime
- `event_modified_datetime`
datetime
- `event_require_address`
0 or 1
- `event_require_dob`
0 or 1
- `event_guests_require_registration`
0 or 1
Default value: 1
- `event_guests_require_email`
int (1)
- `event_guests_require_phone`
int (1)
- `event_guests_require_dob`
0 or 1
- `event_icon`
string (255)
- `event_external_rsvp_url`
string (255)
- `event_description_short`
string (65535)