\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
METHODS
\Components\Marketing\Events\Attendees \Components\Marketing\Events\Categories \Components\Marketing\Events\Locations
Commerce
\Components\Commerce\Carts \Components\Commerce\Carts\Current \Components\Commerce\Configuration\PaymentMethods \Components\Commerce\Configuration\ShippingMethods \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 \Framework\Network\GeoIP

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
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
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
float|null getEventPrice($iEventId)
If the event is associated with a product, return the price of the product.
Parameters
$iEventId
mixed
Return
float|null
void getFromProductId($iProductId)
Retrieves the event corresponding to an event product
Parameters
$iProductId
mixed
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.

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_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)