Documentation

Card
in package

CardDav address books class.

Table of Contents

ADDRESS_MAPPING  = ['Contacts' => ['WORK' => ['addresslevel1a' => ['country'], 'addresslevel7a' => ['postCode'], 'addresslevel2a' => ['state'], 'addresslevel5a' => ['city'], 'addresslevel8a' => ['street'], 'localnumbera' => ['localNumber']], 'HOME' => ['addresslevel1b' => ['country'], 'addresslevel7b' => ['postCode'], 'addresslevel2b' => ['state'], 'addresslevel5b' => ['city'], 'addresslevel8b' => ['street'], 'localnumberb' => ['localNumber']]], 'OSSEmployees' => ['WORK' => ['country' => ['country'], 'code' => ['postCode'], 'state' => ['state'], 'city' => ['city'], 'street' => ['street', 'localNumber']], 'HOME' => ['ship_country' => ['country'], 'ship_code' => ['postCode'], 'ship_state' => ['state'], 'ship_city' => ['city'], 'ship_street' => ['street', 'localNumber']]]]
$mailFields  : array<string|int, mixed>
$telFields  : array<string|int, mixed>
$user  : Users_Record_Model
User record model.
$record  : Vtiger_Record_Model
Record data.
$vcard  : VCard
VCard - object.
addChange()  : mixed
Add change to address books .
deleteByCrmId()  : mixed
Delete card by crm id.
getAddressBook()  : array<string|int, mixed>
Get address books.
getVCard()  : VCalendar
Get VCalendar instance.
loadFromContent()  : self
Load from content.
setRecordAddress()  : void
Set record addres.
setValuesForCreateRecord()  : void
Set values for create record.
setValuesForRecord()  : void
Set values for record.
convertAddress()  : array<string|int, mixed>
Convert address.
getCardGender()  : string
Get card gender).
getCardMail()  : string
Get card mail.
getTypeOfAddress()  : string|null
Get type of address.
parseTel()  : mixed
Parse card phone.

Constants

ADDRESS_MAPPING

public array<string|int, mixed> ADDRESS_MAPPING = ['Contacts' => ['WORK' => ['addresslevel1a' => ['country'], 'addresslevel7a' => ['postCode'], 'addresslevel2a' => ['state'], 'addresslevel5a' => ['city'], 'addresslevel8a' => ['street'], 'localnumbera' => ['localNumber']], 'HOME' => ['addresslevel1b' => ['country'], 'addresslevel7b' => ['postCode'], 'addresslevel2b' => ['state'], 'addresslevel5b' => ['city'], 'addresslevel8b' => ['street'], 'localnumberb' => ['localNumber']]], 'OSSEmployees' => ['WORK' => ['country' => ['country'], 'code' => ['postCode'], 'state' => ['state'], 'city' => ['city'], 'street' => ['street', 'localNumber']], 'HOME' => ['ship_country' => ['country'], 'ship_code' => ['postCode'], 'ship_state' => ['state'], 'ship_city' => ['city'], 'ship_street' => ['street', 'localNumber']]]]

Address mapping for modules.

Properties

$mailFields

public static array<string|int, mixed> $mailFields = ['Contacts' => ['email' => 'WORK', 'secondary_email' => 'HOME'], 'OSSEmployees' => ['business_mail' => 'WORK', 'private_mail' => 'HOME']]

Mail fields.

$telFields

public static array<string|int, mixed> $telFields = ['Contacts' => ['phone' => 'WORK', 'mobile' => 'CELL'], 'OSSEmployees' => ['business_phone' => 'WORK', 'private_phone' => 'CELL', 'secondary_phone' => 'OTHER']]

Phone fields.

$user

User record model.

public Users_Record_Model $user

$vcard

VCard - object.

private VCard $vcard

Methods

addChange()

Add change to address books .

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

deleteByCrmId()

Delete card by crm id.

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

getAddressBook()

Get address books.

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

getVCard()

Get VCalendar instance.

public getVCard() : VCalendar
Return values
VCalendar

loadFromContent()

Load from content.

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

setValuesForRecord()

Set values for record.

public setValuesForRecord(Vtiger_Record_Model $record) : void
Parameters
$record : Vtiger_Record_Model
Return values
void

convertAddress()

Convert address.

private convertAddress(array<string|int, mixed> $addressFromVCard) : array<string|int, mixed>
Parameters
$addressFromVCard : array<string|int, mixed>
Return values
array<string|int, mixed>

getCardGender()

Get card gender).

private getCardGender(string $gender) : string
Parameters
$gender : string
Return values
string

getCardMail()

Get card mail.

private getCardMail(string $type) : string
Parameters
$type : string
Return values
string

getTypeOfAddress()

Get type of address.

private getTypeOfAddress(mixed $property) : string|null
Parameters
$property : mixed
Return values
string|null

parseTel()

Parse card phone.

private parseTel() : mixed
Return values
mixed

        

Search results