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']]]]
MAIL_FIELDS  = ['Contacts' => ['email' => 'WORK', 'secondary_email' => 'HOME'], 'OSSEmployees' => ['business_mail' => 'WORK', 'private_mail' => 'HOME']]
PHONE_FIELDS  = ['Contacts' => ['phone' => 'WORK', 'mobile' => 'CELL'], 'OSSEmployees' => ['business_phone' => 'WORK', 'private_phone' => 'CELL', 'secondary_phone' => 'OTHER']]
$user  : Users_Record_Model
$card  : VCard
$record  : Vtiger_Record_Model
addChange()  : void
Add change to address books .
deleteByCrmId()  : void
Delete card by crm id.
getAddressBook()  : array<string|int, mixed>
Get address books.
getVCard()  : VCard
Get card instance.
loadFromContent()  : self
Load from content.
setRecordAddress()  : void
Set record address.
setValuesForCreateRecord()  : void
Set values for create record.
setValuesForRecord()  : void
Set values for record.
convertAddress()  : array<string|int, string>
Convert address.
getCardGender()  : string
Get card gender).
getTypeOfAddress()  : string|null
Get type of address.
parseMail()  : void
Parse email.
parsePhone()  : void
Parse 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.

MAIL_FIELDS

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

Mail fields.

PHONE_FIELDS

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

Phone fields.

Properties

$user

public Users_Record_Model $user

User record model.

$card

private VCard $card

Card object.

Methods

addChange()

Add change to address books .

public static addChange(int $addressBookId, string $uri, int $operation) : void
Parameters
$addressBookId : int
$uri : string
$operation : int
Return values
void

deleteByCrmId()

Delete card by crm id.

public static deleteByCrmId(int $id) : void
Parameters
$id : int
Return values
void

getAddressBook()

Get address books.

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

getVCard()

Get card instance.

public getVCard() : VCard
Return values
VCard

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

convertAddress()

Convert address.

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

getCardGender()

Get card gender).

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

getTypeOfAddress()

Get type of address.

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

parseMail()

Parse email.

private parseMail() : void
Return values
void

parsePhone()

Parse phone.

private parsePhone() : void
Return values
void

        

Search results