title | type | order | is_code |
---|---|---|---|
EventModel |
guide |
8 |
true |
An EventModel
is an object that represents an event.
Whenever you’re dealing with an event in your template, you’re actually working with an EventModel
.
EventModel
objects have the following properties:
The ID of the schedule rule from which this event was generated.
The ID of the calendar that contains this event.
An alias to getCalendar()
The ID of the field that generated this event.
An alias to getField()
The ID of the owner element that generated this event.
An alias to getOwner()
The event Element's type.
A DateTime
object representing the event's start date.
A DateTime
object representing the event's end date.
A boolean representing whether the event spans the entire day.
A boolean representing whether the event's start and end times are the same.
A boolean representing whether the event has recurrences.
A boolean representing whether the event repeats forever.
A DateTime
object of the date the entry data was created.
A DateTime
object of the date the entry data was updated.
EventModel
objects have the following methods:
Returns a CalendarModel
object representing the calendar that contains the event.
If you left the attachEvents parameter set to true
(the default), this property contains the full owner element object, including all its properties and methods. (This varies by Element Type, but will be some subclass of BaseElementModel
.
If you set the fetchElements parameter to false
, using this property spawns a one-off query to return the element to you.
Returns a FieldModel
representing the field responsible for storing the event's data.