Documentation

Calendar
in package

CalDav calendar class.

Table of Contents

MAX_DATE  = '2038-01-01'
Max date.
$customValues  : array<string|int, string>
Custom values.
$createdTimeZone  : bool
Optimization for creating a time zone.
$record  : Vtiger_Record_Model
Record data.
$records  : array<string|int, Vtiger_Record_Model>
Record model instance.
$vcalendar  : VCalendar
VCalendar object.
$vcomponent  : Component
addChange()  : mixed
Add change to calendar.
createComponent()  : Component
Create calendar entry component.
createEmptyInstance()  : Calendar
Create empty instance.
createTimeZone()  : Component
Create time zone.
davSaveAttendee()  : mixed
Dav save attendee.
delete()  : mixed
Dav delete.
deleteByCrmId()  : mixed
Delete calendar event by crm id.
findRecordByEmail()  : array<string|int, mixed>
Find crm id by email.
getAttendeeStatus()  : false|string
Get attendee status.
getByRecordId()  : bool
Create a class instance by crm id.
getCalendar()  : array<string|int, mixed>
Get calendar.
getComponent()  : Component
Get calendar component instance.
getDenormalizedData()  : array<string|int, mixed>
Parses some information from calendar objects, used for optimized calendar-queries.
getInvitations()  : array<string|int, mixed>
Get invitations for record id.
getRecordInstance()  : array<string|int, Vtiger_Record_Model>
Get record instance.
getVCalendar()  : VCalendar
Get VCalendar instance.
loadFromArray()  : mixed
Load record data.
loadFromContent()  : Calendar
Create a class instance from vcalendar content.
loadFromDav()  : Calendar
Create instance from dav data.
recordSaveAttendee()  : mixed
Record save attendee.
updateComponent()  : mixed
Update calendar entry component.
createDateTime()  : mixed
Create date and time values for dav.
createPriority()  : mixed
Create priority value for dav.
createState()  : mixed
Create visibility value for dav.
createStatus()  : mixed
Create status value for dav.
createText()  : mixed
Create a text value for dav.
createVisibility()  : mixed
Create visibility value for dav.
parseComponent()  : void
Parse component.
parseCustomValues()  : void
Parse parse custom values.
parseDateTime()  : void
Parse date time.
parsePriority()  : void
Parse priority.
parseState()  : void
Parse state.
parseStatus()  : void
Parse status.
parseText()  : void
Parse simple text.
parseType()  : void
Parse type.
parseVisibility()  : void
Parse visibility.

Constants

MAX_DATE

Max date.

public string MAX_DATE = '2038-01-01'

Properties

$customValues

Custom values.

protected static array<string|int, string> $customValues = ['X-GOOGLE-CONFERENCE' => 'meeting_url', 'X-MS-OLK-MWSURL' => 'meeting_url', 'X-MICROSOFT-SKYPETEAMSMEETINGURL' => 'meeting_url', 'X-MICROSOFT-ONLINEMEETINGCONFLINK' => 'meeting_url', 'X-MICROSOFT-ONLINEMEETINGEXTERNALLINK' => 'meeting_url']

$createdTimeZone

Optimization for creating a time zone.

private bool $createdTimeZone = false

$vcalendar

VCalendar object.

private VCalendar $vcalendar

$vcomponent

private Component $vcomponent

Methods

addChange()

Add change to calendar.

public static addChange(int $calendarId, string $uri, int $operation) : mixed
Parameters
$calendarId : int
$uri : string
$operation : int
Tags
throws
Exception
Return values
mixed

createComponent()

Create calendar entry component.

public createComponent() : Component
Return values
Component

createTimeZone()

Create time zone.

public createTimeZone(string $tzid, int $from, int $to) : Component
Parameters
$tzid : string
$from : int
$to : int
Tags
throws
Exception
Return values
Component

davSaveAttendee()

Dav save attendee.

public davSaveAttendee(array<string|int, mixed> $record) : mixed
Parameters
$record : array<string|int, mixed>
Return values
mixed

delete()

Dav delete.

public static delete(array<string|int, mixed> $calendar) : mixed
Parameters
$calendar : array<string|int, mixed>
Tags
throws
Exception
Return values
mixed

deleteByCrmId()

Delete calendar event by crm id.

public static deleteByCrmId(int $id) : mixed
Parameters
$id : int
Tags
throws
Exception
Return values
mixed

findRecordByEmail()

Find crm id by email.

public findRecordByEmail(int|string $value[, array<string|int, mixed> $allowedModules = [] ][, array<string|int, mixed> $skipModules = [] ]) : array<string|int, mixed>
Parameters
$value : int|string
$allowedModules : array<string|int, mixed> = []
$skipModules : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getAttendeeStatus()

Get attendee status.

public getAttendeeStatus(string $value[, bool $toCrm = true ]) : false|string
Parameters
$value : string
$toCrm : bool = true
Return values
false|string

getByRecordId()

Create a class instance by crm id.

public getByRecordId(int $record, string $uid) : bool
Parameters
$record : int
$uid : string
Return values
bool

getCalendar()

Get calendar.

public static getCalendar(int $id) : array<string|int, mixed>
Parameters
$id : int
Return values
array<string|int, mixed>

getComponent()

Get calendar component instance.

public getComponent() : Component
Return values
Component

getDenormalizedData()

Parses some information from calendar objects, used for optimized calendar-queries.

public getDenormalizedData(string $calendarData) : array<string|int, mixed>

Returns an array with the following keys:

  • etag - An md5 checksum of the object without the quotes.
  • size - Size of the object in bytes
  • componentType - VEVENT, VTODO or VJOURNAL
  • firstOccurence
  • lastOccurence
  • uid - value of the UID property
Parameters
$calendarData : string
Tags
see
PDO::getDenormalizedData
Return values
array<string|int, mixed>

getInvitations()

Get invitations for record id.

public getInvitations(int $recordId) : array<string|int, mixed>
Parameters
$recordId : int
Return values
array<string|int, mixed>

getVCalendar()

Get VCalendar instance.

public getVCalendar() : VCalendar
Return values
VCalendar

loadFromArray()

Load record data.

public loadFromArray(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>
Return values
mixed

loadFromContent()

Create a class instance from vcalendar content.

public static loadFromContent(string $content[, Vtiger_Record_Model|null $recordModel = null ][, string|null $uid = null ]) : Calendar
Parameters
$content : string
$recordModel : Vtiger_Record_Model|null = null
$uid : string|null = null
Return values
Calendar

loadFromDav()

Create instance from dav data.

public static loadFromDav(string $calendar) : Calendar
Parameters
$calendar : string
Return values
Calendar

recordSaveAttendee()

Record save attendee.

public recordSaveAttendee(Vtiger_Record_Model $record) : mixed
Parameters
$record : Vtiger_Record_Model
Return values
mixed

updateComponent()

Update calendar entry component.

public updateComponent() : mixed
Tags
throws
InvalidDataException
Return values
mixed

createDateTime()

Create date and time values for dav.

private createDateTime() : mixed
Return values
mixed

createPriority()

Create priority value for dav.

private createPriority() : mixed
Return values
mixed

createState()

Create visibility value for dav.

private createState() : mixed
Return values
mixed

createStatus()

Create status value for dav.

private createStatus() : mixed
Return values
mixed

createText()

Create a text value for dav.

private createText(string $fieldName, string $davName) : mixed
Parameters
$fieldName : string
$davName : string
Tags
throws
InvalidDataException
Return values
mixed

createVisibility()

Create visibility value for dav.

private createVisibility() : mixed
Return values
mixed

parseComponent()

Parse component.

private parseComponent() : void
Return values
void

parseCustomValues()

Parse parse custom values.

private parseCustomValues() : void
Return values
void

parseDateTime()

Parse date time.

private parseDateTime() : void
Return values
void

parsePriority()

Parse priority.

private parsePriority() : void
Return values
void

parseState()

Parse state.

private parseState() : void
Return values
void

parseStatus()

Parse status.

private parseStatus() : void
Return values
void

parseText()

Parse simple text.

private parseText(string $fieldName, string $davName) : void
Parameters
$fieldName : string
$davName : string
Return values
void

parseType()

Parse type.

private parseType() : void
Return values
void

parseVisibility()

Parse visibility.

private parseVisibility() : void
Return values
void

        

Search results