Methods |
public
static
|
getInstance(): Module
|
#
|
public
static
|
Decorator(): Module
|
#
|
public
|
getModuleSettings(): Settings
|
#
|
public
|
init()
Initializes Contacts Module.
Initializes Contacts Module.
Implements
|
#
|
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
|
GetStorageDisplayName($Storage)
|
#
|
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,
Builder $Filters = null,
string $GroupUUID = '',
array $ContactUUIDs = [],
bool $AddressBookId = null,
)
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, $UUIDs = [], $Search = ''): 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
|
GetContacts(
$UserId,
string $Storage = '',
int $Offset = 0,
int $Limit = 20,
int $SortField = SortField::Name,
int $SortOrder = SortOrder::ASC,
string $Search = '',
string $GroupUUID = '',
Builder $Filters = null,
bool $WithGroups = false,
bool $WithoutTeamContactsDuplicates = false,
bool $Suggestions = false,
bool $AddressBookId = null,
): 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)
This method used as trigger for subscibers. Check these modules: PersonalContacts, SharedContacts, TeamContacts
This method used as trigger for subscibers. Check these modules: PersonalContacts, SharedContacts, TeamContacts
|
#
|
public
|
CheckAccessToAddressBook($User, $AddressBookId, $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, int|null $AddressBookId = null): Collection|null
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, int|null $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): array|bool
Updates contact with specified parameters.
Updates contact with specified parameters.
Parameters
$Contact |
Parameters of contact to update.
|
|
#
|
public
|
MoveContactsToStorage($UserId, $FromStorage, $ToStorage, $UUIDs)
|
#
|
public
|
UpdateContactObject(Contact $Contact): string|bool
!Not public
This method is restricted to be called by web API (see denyMethodsCallByWebApi method).
!Not public
This method is restricted to be called by web API (see denyMethodsCallByWebApi method).
|
#
|
public
|
DeleteContacts(int $UserId, string $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 |
ID of group.
|
$ContactUUIDs |
Array of strings - IDs 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 |
ID of group.
|
$ContactUUIDs |
Array of strings - IDs 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
|
UpdateSharedContacts($UserId, $UUIDs)
|
#
|
public
|
AddContactsFromFile($UserId, $File)
|
#
|
public
|
SaveContactAsTempFile(int $UserId, string $UUID, string $FileName)
|
#
|
public
|
onAfterUseEmails($Args, &$Result)
|
#
|
public
|
onGetBodyStructureParts($aParts, &$aResultParts)
|
#
|
public
|
onBeforeDeleteUser(&$aArgs, &$mResult)
|
#
|
public
|
onAfterDeleteUser(&$aArgs, &$mResult)
|
#
|
public
|
onContactToResponseArray($aArgs, &$mResult)
|
#
|
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)
|
#
|
public
|
GetStoragesMapToAddressbooks()
|
#
|