Properties

$id

$id : integer

Type

integer — String/Integer. Optional. Uniquely identifies the given event. Different instances of repeating events should all have the same id.

$type

$type : integer

Type

integer — : type of user

$user_id

$user_id : integer

Type

integer — : current logged in user id

$name

$name : string

Type

string — : calendar name

$description

$description : string

Type

string — non standard

$color

$color : string

Type

string — Sets an event's background and border color just like the calendar-wide eventColor option.

$admin_id

$admin_id : integer

Type

integer — : not in use in version 1.0.1

$status

$status : string

Type

string — : show/hide status of calendar

$show_in_list

$show_in_list : string

Type

string — : whether to show a calendar in the list or not

$public

$public : int

Type

int — : whether a calendar is set to public or not

$reminder_message_email

$reminder_message_email : string

Type

string — : reminder type as message email, not implemented in version 1.0.1

$reminder_message_popup

$reminder_message_popup : string

Type

string — : reminder type as message popup window, not implemented in version 1.0.1

$access_key

$access_key : string

Type

string — : not in use in this version 1.0.1

$created_on

$created_on : bool|string

Type

bool|string — : the date of a calendar that has been created

$updated_on

$updated_on : string

Type

string — : the date that a calendar has been updated, not implemented in this version 1.0.1

$db

$db

$dbObj

$dbObj

$allCalendars

$allCalendars : array|null

Type

array|null — : list of calendars

$calendarProperties

$calendarProperties : null

Type

null — : calendar properties

$language

$language : string

Type

string — , a set of languages can be setup, not in use in this version 1.0.1

$time_zone

$time_zone : string

Type

string — , a set of different timezones, not in use in this version 1.0.1

$default_view

$default_view : string

Type

string — , a set of views provided by full calendar Values: Month, Week, Day, Agenda

$shortdate_format

$shortdate_format : string

Type

string — , a set of date formats as short form of dates Formats: MM/dd/yyyy, dd/MM/yyyy, dd-MM-yyyy, MM-dd-yyyy, dd-MM-yy, MMM dd, yyyy

$longdate_format

$longdate_format

$timeformat

$timeformat

$start_day

$start_day : string

Type

string — , the first day of the week Values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday

$title

$title : string

Type

string — Required. The title on an event's element Required

$allDay

$allDay : string

Type

string — true or false. Optional. Whether an event occurs at a specific time-of-day. This property affects whether an event's time is shown. Also, in the agenda views, determines if it is displayed in the "all-day" section. Don't include quotes around your true/false. This value is not a string! When specifying Event Objects for events or eventSources, omitting this property will make it inherit from allDayDefault, which is normally true.

$start

$start : string

Type

string — Start date for the event Required Date. Required. The date/time an event begins. When specifying Event Objects for events or eventSources, you may specify a string in IETF format (ex: "Wed, 18 Oct 2009 13:00:00 EST"), a string in ISO8601 format (ex: "2009-11-05T13:15:30Z") or a UNIX timestamp.

$end

$end : string

Type

string — Date. Optional. The date/time an event ends. As with start, you may specify it in IETF, ISO8601, or UNIX timestamp format. If an event is all-day... the end date is inclusive. This means an event with start Nov 10 and end Nov 12 will span 3 days on the calendar. If an event is NOT all-day... the end date is exclusive. This is only a gotcha when your end has time 00:00. It means your event ends on midnight, and it will not span through the next day.

$url

$url : string

Type

string — String. Optional. A URL that will be visited when this event is clicked by the user. For more information on controlling this behavior, see the eventClick callback.

$className

$className : string

Type

string — String/Array. Optional. A CSS class (or array of classes) that will be attached to this event's element.

$editable

$editable : string

Type

string — true or false. Optional. Overrides the master editable option for this single event.

$startEditable

$startEditable : string

Type

string — true or false. Optional. Overrides the master eventStartEditable option for this single event.

$durationEditable

$durationEditable : string

Type

string — true or false. Optional. Overrides the master eventDurationEditable option for this single event.

$source

$source : string

Type

string — Event Source Object. Automatically populated. A reference to the event source that this event came from

$backgroundColor

$backgroundColor : string

Type

string — Sets an event's background color just like the calendar-wide eventBackgroundColor option.

$borderColor

$borderColor : string

Type

string — Sets an event's border color just like the the calendar-wide eventBorderColor option.

$textColor

$textColor : string

Type

string — Sets an event's text color just like the calendar-wide eventTextColor option.

$free_busy

$free_busy : string

Type

string

$location

$location : string

Type

string

$privacy

$privacy : string

Type

string

$reminder_type

$reminder_type : string

Type

string

$repeat_start_date

$repeat_start_date : string

Type

string

$repeat_end_on

$repeat_end_on : string

Type

string

$repeat_end_after

$repeat_end_after : string

Type

string

$repeat_never

$repeat_never : string

Type

string

$repeat_by

$repeat_by : string

Type

string

$reminder_time

$reminder_time : string

Type

string

$reminder_time_unit

$reminder_time_unit : string

Type

string

$repeat

$repeat : integer

Type

integer

$repeat_type

$repeat_type : string

Type

string

$errorNo

$errorNo : int

Type

int — : error numbers

$errMsg

$errMsg : bool

Type

bool — : determines whether there is an error or not

$errMsgList

$errMsgList : array

Type

array — : list of error messages

$eventIndex

$eventIndex

$loadEventsOnPageLoad

$loadEventsOnPageLoad

Methods

__construct()

__construct(int $calendarID, string $title, string $start, string $end, string $url, string $allDay, string $className, string $editable, string $startEditable, string $durationEditable, string $source, string $color, string $backgroundColor, string $borderColor, string $textColor, string $description, string $free_busy, string $location, string $privacy, string $reminder_type, string $repeat_start_date, string $repeat_end_on, string $repeat_end_after, string $repeat_never,  $repeat_by, string $reminder_time, string $reminder_time_unit, string $repeat_type, string $repeat_interval, int $repeat_on_sun, int $repeat_on_mon, int $repeat_on_tue, int $repeat_on_wed, int $repeat_on_thu, int $repeat_on_fri, int $repeat_on_sat)

Constructor Function for Events

Creates an Event Object when called. By default creates an event object and if user requests 'LOAD_MY_EVENTS' then it loads all events based on logged in users

Parameters

int $calendarID
string $title
string $start
string $end
string $url
string $allDay
string $className
string $editable
string $startEditable
string $durationEditable
string $source
string $color
string $backgroundColor
string $borderColor
string $textColor
string $description
string $free_busy
string $location
string $privacy
string $reminder_type
string $repeat_start_date
string $repeat_end_on
string $repeat_end_after
string $repeat_never
$repeat_by
string $reminder_time
string $reminder_time_unit
string $repeat_type
string $repeat_interval
int $repeat_on_sun
int $repeat_on_mon
int $repeat_on_tue
int $repeat_on_wed
int $repeat_on_thu
int $repeat_on_fri
int $repeat_on_sat

loadAllCalendars()

loadAllCalendars(integer $userID) : array|null

Loads all calendar for current logged in user

Parameters

integer $userID

current logged in user

Returns

array|null —

if any calendar is found then an array is returned, otherwise NULL will be returned

getFirstCalendarID()

getFirstCalendarID( $userID)

Parameters

$userID

loadSingleCalendarData()

loadSingleCalendarData(mixed $calID) : mixed|null

Loads Single Calendar Data

Parameters

mixed $calID

Returns

mixed|null

saveCalendar()

saveCalendar(array $params) : bool|integer

Saves a new calendar

While saving it finds the current logged in user from session.

Parameters

array $params

Returns

bool|integer —

on success returns inserted calendar id, otherwise returns a boolean false

editCalendar()

editCalendar(array $params, integer $id) : bool|integer

Edits a given calendar

Parameters

array $params
integer $id

Returns

bool|integer —

on success returns updated calendar id, otherwise returns a boolean false

loadCalendarSettings()

loadCalendarSettings( $userID) : null|\array,

Loads all calendar settings

Description: Loads all calendar settings for current logged in user

Parameters

$userID

Returns

null|\array, —

the set of current calendar settings for given user id

saveCalendarSettings()

saveCalendarSettings( $params) : bool|\integer,

Saves calendar settings

Description: Saves calendar settings based on user request

Parameters

$params

Returns

bool|\integer, —

if success returns the new calendar settings id, otherwise false

updateCalendarSettings()

updateCalendarSettings( $params,  $id) : bool|\integer,

Updates calendar settings

Description: Updates calendar settings based on user request

Parameters

$params
$id

Returns

bool|\integer, —

if success then returns calendar settings id, otherwise false

loadSingleEventData()

loadSingleEventData(mixed $eventID) : mixed|null

Loads Single Event based on Event ID passed in parameter

Parameters

mixed $eventID

Returns

mixed|null

loadAllEvents()

loadAllEvents(int $calID) : null|string

Loads all events based on calendar ID

Parameters

int $calID

Returns

null|string

getWeekPositionInMonth()

getWeekPositionInMonth(mixed $date, mixed $rollover) : int

Returns the amount of weeks into the month a date is

Parameters

mixed $date
mixed $rollover

Returns

int

getWeekPositionBasedOnDayInMonth()

getWeekPositionBasedOnDayInMonth( $cDate,  $dayNameOfTheMonthForStartDate)

Parameters

$cDate
$dayNameOfTheMonthForStartDate

handleRepeatEvents()

handleRepeatEvents( $res,  $eventValues,  $start_time,  $end_time)

Parameters

$res
$eventValues
$start_time
$end_time

saveEvent()

saveEvent(array $params) : bool|integer

Saves events

Parameters

array $params

Returns

bool|integer —

on success returns the event id, otherwise boolean false

editEvent()

editEvent(array $params, mixed $id) : bool|integer

Edits events based on event id passed

Parameters

array $params
mixed $id

Returns

bool|integer —

on success returns the effected event id, otherwise boolean false

removeEvent()

removeEvent(mixed $eventID) : bool|mixed

Sets a calendar active

Parameters

mixed $eventID

Returns

bool|mixed

findExternalURLForCalendars()

findExternalURLForCalendars(string|array $calIds) : bool|mixed

Finds calendar ids with external URL

Parameters

string|array $calIds

comma separated calendar id Ex: 123,3,12

Returns

bool|mixed