\Event
Event Model Events can have calendars, but don't necessary have to.
Synopsis
class Event
extends DataObject
{
- // members
- public static array $db = ;
- public static array $summary_fields = ;
- public static string $default_sort = 'StartDateTime';
- protected boolean $hasWritten = false;
- // methods
- public void summaryFields()
- public void DetailsSummary()
- public void onBeforeWrite()
- public void setStartEnd()
- public void setEnd()
- public string calcEndDateTimeBasedOnDuration()
- public string|false calcDurationBasedOnEndDateTime()
- public boolean isAllDay()
- public void getFrontEndFields()
- public void getCMSFields()
- public void getAddNewFields()
- public void getIsPastEvent()
- public void getFormattedDates()
- public void getFormattedTimeframe()
- public void getStartAndEndDates()
- public void getDatesAndTimeframe()
Hierarchy
Extends
- DataObject
Members
protected
- $hasWritten
public
- $db
- $default_sort
- $summary_fields
Methods
public
- DetailsSummary()
- calcDurationBasedOnEndDateTime() — Calculation of duration based on end datetime Returns false if there's more than 24h between start and end date
- calcEndDateTimeBasedOnDuration() — Calculation of end date based on duration Should only be used in OnBeforeWrite
- getAddNewFields()
- getCMSFields() — CMS Fields
- getDatesAndTimeframe()
- getFormattedDates() — Formatted Dates Returns either the event's date or both start and end date if the event spans more than one date
- getFormattedTimeframe()
- getFrontEndFields() — Frontend fields Simple list of the basic fields - how they're intended to be edited
- getIsPastEvent()
- getStartAndEndDates()
- isAllDay() — All Day getter Any events that spans more than 24h will be displayed as allday events Beyond that those events marked as all day events will also be displayed as such
- onBeforeWrite() — Sanity checks before write Rules for event saving: 1. Events have
- setEnd() — Set new end date
- setStartEnd() — Set new start/end dates
- summaryFields()