Methods |
public
static
|
getInstance(): Module
|
#
|
public
|
getManager()
|
#
|
public
|
init()
Initializes Contacts Module.
Initializes Contacts Module.
Implements
|
#
|
public
|
GetApiContactsManager(): CApiContactsManager
Returns API contacts manager.
Returns API contacts manager.
|
#
|
public
|
GetSettings(): array
Obtains list of module settings for authenticated user.
Obtains list of module settings for authenticated user.
Overrides
|
#
|
public
|
IsDisplayedStorage($Storage)
|
#
|
public
|
GetContactStorages()
|
#
|
public
|
GetStorages()
|
#
|
public
|
UpdateSettings(int $ContactsPerPage): boolean
Updates module's settings - saves them to config.json file or to user settings in db.
Updates module's settings - saves them to config.json file or to user settings in db.
Parameters
$ContactsPerPage |
Count of contacts per page.
|
|
#
|
public
|
Export($UserId, $Storage, string $Format, array $Filters = null, string $GroupUUID = '', array $ContactUUIDs = [])
Exports specified contacts to a file with specified format.
Exports specified contacts to a file with specified format.
Parameters
$Format |
File format that should be used for export.
|
$Filters |
Filters for obtaining specified contacts.
|
$GroupUUID |
UUID of group that should contain contacts for export.
|
$ContactUUIDs |
List of UUIDs of contacts that should be exported.
|
|
#
|
public
|
GetContactAsVCF($UserId, $Contact)
|
#
|
public
|
GetGroups($UserId = null): array
Returns all groups for authenticated user.
Returns all groups for authenticated user.
|
#
|
public
|
GetGroup($UserId, string $UUID): Group
Returns group with specified UUID.
Returns group with specified UUID.
Parameters
$UUID |
UUID of group to return.
|
|
#
|
public
|
GetGroupByName($Name, $UserId = null): Group
Returns group item identified by its name.
Returns group item identified by its name.
|
#
|
public
|
GetContacts(
$UserId,
string $Storage = '',
int $Offset = 0,
int $Limit = 20,
int $SortField = SortField::Name,
int $SortOrder = SortOrder::ASC,
string $Search = '',
string $GroupUUID = '',
array $Filters = null,
bool $WithGroups = false,
bool $WithoutTeamContactsDuplicates = false,
$Suggestions = false,
): array
Returns list of contacts for specified parameters.
Returns list of contacts for specified parameters.
Parameters
$Storage |
Storage type of contacts.
|
$Offset |
Offset of contacts list.
|
$Limit |
Limit of result contacts list.
|
$SortField |
Name of field order by.
|
$SortOrder |
Sorting direction.
|
$Search |
Search string.
|
$GroupUUID |
UUID of group that should contain all returned contacts.
|
$Filters |
Other conditions for obtaining contacts list.
|
$WithGroups |
Indicates whether contact groups should be included in the contact list
|
$WithoutTeamContactsDuplicates |
Do not show a contact from the global address book if the contact with the same email address already exists in personal address book
|
|
#
|
public
|
GetContactSuggestions(
$UserId,
$Storage,
$Limit = 20,
$SortField = SortField::Name,
$SortOrder = SortOrder::ASC,
$Search = '',
$WithGroups = false,
$WithoutTeamContactsDuplicates = false,
$WithUserGroups = false,
)
|
#
|
public
|
CheckAccessToObject($User, $Contact, $Access = null)
|
#
|
public
|
GetContact(string $UUID, $UserId = null): Contact
Returns contact with specified UUID.
Returns contact with specified UUID.
Parameters
$UUID |
UUID of contact to return.
|
|
#
|
public
|
GetContactsByEmails($UserId, string $Storage, array $Emails, $Filters = null, $AsArray = true): array
Returns list of contacts with specified emails.
Returns list of contacts with specified emails.
Parameters
$Storage |
storage of contacts.
|
$Emails |
List of emails of contacts to return.
|
|
#
|
public
|
GetContactsByUids(int $UserId, array $Uids): array
Returns list of contacts with specified uids.
Returns list of contacts with specified uids.
Parameters
$Uids |
List of uids of contacts to return.
|
|
#
|
public
|
GetContactsInfo(string $Storage, $UserId = null, Builder $Filters = null): array
Returns list of contacts with specified emails.
Returns list of contacts with specified emails.
Parameters
$Storage |
storage of contacts.
|
|
#
|
public
|
CreateContact(array $Contact, int $UserId = null): bool|string
Creates contact with specified parameters.
Creates contact with specified parameters.
Parameters
$Contact |
Parameters of contact to create.
|
$UserId |
Identifier of user that should own a new contact.
|
Throws
|
#
|
public
|
UpdateContact($UserId, array $Contact): bool
Updates contact with specified parameters.
Updates contact with specified parameters.
Parameters
$Contact |
Parameters of contact to update.
|
|
#
|
public
|
UpdateContactObject($Contact)
|
#
|
public
|
DeleteContacts($UserId, $Storage, array $UUIDs): bool
Deletes contacts with specified UUIDs.
Deletes contacts with specified UUIDs.
Parameters
$UUIDs |
Array of strings - UUIDs of contacts to delete.
|
|
#
|
public
|
CreateGroup(array $Group, $UserId = null): string|bool
Creates group with specified parameters.
Creates group with specified parameters.
Parameters
$Group |
Parameters of group to create.
|
|
#
|
public
|
UpdateGroup($UserId, array $Group): boolean
Updates group with specified parameters.
Updates group with specified parameters.
Parameters
$Group |
Parameters of group to update.
|
|
#
|
public
|
DeleteGroup($UserId, string $UUID): bool
Deletes group with specified UUID.
Deletes group with specified UUID.
Parameters
$UUID |
UUID of group to delete.
|
|
#
|
public
|
AddContactsToGroup($UserId, string $GroupUUID, array $ContactUUIDs): boolean
Adds specified contacts to specified group.
Adds specified contacts to specified group.
Parameters
$GroupUUID |
UUID of group.
|
$ContactUUIDs |
Array of strings - UUIDs of contacts to add to group.
|
|
#
|
public
|
RemoveContactsFromGroup($UserId, string $GroupUUID, array $ContactUUIDs): boolean
Removes specified contacts from specified group.
Removes specified contacts from specified group.
Parameters
$GroupUUID |
UUID of group.
|
$ContactUUIDs |
Array of strings - UUIDs of contacts to remove from group.
|
|
#
|
public
|
Import($UserId, array $UploadData, array $GroupUUID, $Storage = null): array
Imports contacts from file with specified format.
Imports contacts from file with specified format.
Parameters
$UploadData |
Array of uploaded file data.
|
$GroupUUID |
Group UUID.
|
Throws
|
#
|
public
|
GetGroupEvents($UserId, $UUID)
|
#
|
public
|
UpdateSharedContacts($UserId, $UUIDs)
|
#
|
public
|
AddContactsFromFile($UserId, $File)
|
#
|
public
|
GetCTag($UserId, $Storage)
|
#
|
public
|
SaveContactAsTempFile(type $UserId, type $UUID, type $FileName)
|
#
|
public
|
onAfterUseEmails($Args, &$Result)
|
#
|
public
|
onGetBodyStructureParts($aParts, &$aResultParts)
|
#
|
public
|
onAfterDeleteUser(&$aArgs, &$mResult)
|
#
|
public
|
onCreateOrUpdateEvent(&$aArgs)
|
#
|
public
|
removeEventFromAllGroups(string $sCalendarUUID, string $sEventUUID): bool
|
#
|
public
|
GetAddressBook($UserId, $UUID)
|
#
|
public
|
GetAddressBooks($UserId = null)
|
#
|
public
|
CreateAddressBook($AddressBookName, $UserId = null, $UUID = null)
|
#
|
public
|
UpdateAddressBook($EntityId, $AddressBookName, $UserId = null)
|
#
|
public
|
DeleteAddressBook($EntityId, $UserId = null)
|
#
|
public
|
DeleteUsersAddressBooks($UserId = null)
|
#
|