public
|
#
__construct( CApiGlobalManager & $oManager, $sForcedStorage = '' )
Parameters
- $oManager
- $oManager
- $sForcedStorage
|
public
CContactListItem
|
#
createContactListItemObject( )
Creates a new instance of ContactList object.
Creates a new instance of ContactList object.
Returns
CContactListItem
|
public
CContact
|
#
createContactObject( )
Creates a new instance of Contact object.
Creates a new instance of Contact object.
Returns
CContact
|
public
CGroup
|
#
createGroupObject( )
Creates a new instance of Group object.
Creates a new instance of Group object.
Returns
CGroup
|
public
CContact|boolean
|
#
getContactById( integer $iUserId, mixed $mContactId, boolean $bIgnoreHideInGab = false, integer $iSharedTenantId = null, boolean $bIgnoreAutoCreate = false )
Returns contact item identified by user ID and contact ID.
Returns contact item identified by user ID and contact ID.
Parameters
- $iUserId
- User ID value
- $mContactId
- Contact ID value
- $bIgnoreHideInGab
- If true, the contact will be fetched from Global Address Book disregarding Hidden flag. Default value is false. Aurora only.
- $iSharedTenantId
- If set, the search will be performed within shared contacts of the specified tenant. Default value is null. Aurora only.
- $bIgnoreAutoCreate
- Default value is false
Returns
CContact|boolean
|
public
CContact|boolean
|
#
getContactByEmail( integer $iUserId, string $sEmail )
Returns contact item identified by email address.
Returns contact item identified by email address.
Parameters
- $iUserId
- User ID
- $sEmail
- Email address
Returns
CContact|boolean
|
public
CContact|boolean
|
#
getContactByStrId( integer $iUserId, string $sContactStrId, integer $iSharedTenantId = null )
Returns contact item identified by str_id value.
Returns contact item identified by str_id value.
Parameters
- $iUserId
- User ID
- $sContactStrId
- str_id value to look up
- $iSharedTenantId
- Tenant ID. Default value is null. Aurora only.
Returns
CContact|boolean
|
public
array
|
#
getSharedContactIds( integer $iUserId, integer $iSharedTenantId = null )
Returns list of shared contacts by str_id value.
Returns list of shared contacts by str_id value.
Parameters
- $iUserId
- $iSharedTenantId
- Tenant ID. Default value is null. Aurora only.
Returns
array
|
public
array|boolean
|
#
getContactGroupsIds( CContact $oContact )
Returns list of groups ID's the specific contact belongs to.
Returns list of groups ID's the specific contact belongs to.
Parameters
Returns
array|boolean
|
public
CGroup
|
#
getGroupById( integer $iUserId, mixed $mGroupId )
Returns group item identified by its ID.
Returns group item identified by its ID.
Parameters
- $iUserId
- User ID
- $mGroupId
- Group ID
Returns
CGroup
|
public
CGroup
|
#
getGroupByStrId( integer $iUserId, string $sGroupStrId )
Returns group item identified by str_id value.
Returns group item identified by str_id value.
Parameters
- $iUserId
- User ID
- $sGroupStrId
- str_id value
Returns
CGroup
|
public
CGroup
|
#
getGroupByName( integer $iUserId, string $sName )
Returns group item identified by its name.
Returns group item identified by its name.
Parameters
Returns
CGroup
|
public
boolean
|
#
updateContact( CContact $oContact, boolean $bUpdateFromGlobal = true )
Updates contact information. Using this method is required to finalize changes made to the contact object.
Updates contact information. Using this method is required to finalize changes made to the contact object.
Parameters
- $oContact
- Contact object to be updated
- $bUpdateFromGlobal
Returns
boolean
|
public
boolean
|
#
updateContactUserId( CContact $oContact, integer $iUserId )
Update contact information setting a new user ID
Update contact information setting a new user ID
Parameters
- $oContact
- Contact object to be updated
- $iUserId
- User ID
Returns
boolean
|
public
boolean
|
#
updateGroup( CGroup $oGroup )
Updates group information. Using this method is required to finalize changes made to the group object.
Updates group information. Using this method is required to finalize changes made to the group object.
Parameters
Returns
boolean
|
public
integer
|
#
getContactItemsCount( integer $iUserId, string $sSearch = '', string $sFirstCharacter = '', integer $iGroupId = 0, integer $iTenantId = null, boolean $bAll = false )
Returns list of contacts which match the specified criteria
Returns list of contacts which match the specified criteria
Parameters
- $iUserId
- User ID
- $sSearch
- Search pattern. Default value is empty string.
- $sFirstCharacter
- If specified, will only return contacts with names starting from the specified character. Default value is empty string.
- $iGroupId
- Group ID. Default value is 0.
- $iTenantId
- Group ID. Default value is null.
- $bAll
- Default value is null
Returns
integer
|
public
array|boolean
|
#
getContactItemsWithoutOrder( integer $iUserId, integer $iOffset = 0, integer $iRequestLimit = 20 )
Returns list of contacts within specified range. Sorting is not performed.
Returns list of contacts within specified range. Sorting is not performed.
Parameters
- $iUserId
- User ID
- $iOffset
- Ordinal number of the contact item the list stars with. Default value is 0.
- $iRequestLimit
- The upper limit for total number of contacts returned. Default value is 20.
Returns
array|boolean
|
public
array|boolean
|
#
getContactItems( string $mUserId, integer $iSortField = EContactSortField::EMail, integer $iSortOrder = ESortOrder::ASC, integer $iOffset = 0, integer $iRequestLimit = 20, string $sSearch = '', string $sFirstCharacter = '', string $mGroupId = '', integer $iTenantId = null, boolean $bAll = false )
Returns list of contacts within specified range, sorted according to specified requirements.
Returns list of contacts within specified range, sorted according to specified requirements.
Parameters
- $mUserId
- User ID.
- $iSortField
Sort field. Accepted values:
EContactSortField::Name
EContactSortField::EMail
EContactSortField::Frequency
Default value is EContactSortField::EMail.
- $iSortOrder
Sorting order. Accepted values:
ESortOrder::ASC
ESortOrder::DESC,
for ascending and descending respectively. Default value is ESortOrder::ASC.
- $iOffset
- Ordinal number of the contact item the list stars with. Default value is 0.
- $iRequestLimit
- The upper limit for total number of contacts returned. Default value is 20.
- $sSearch
- Search pattern. Default value is empty string.
- $sFirstCharacter
- If specified, will only return contacts with names starting from the specified character. Default value is empty string.
- $mGroupId
- Group ID. Default value is empty string.
- $iTenantId
- Tenant ID. Default value is null. Aurora only.
- $bAll
Returns
array|boolean
|
public
integer
|
#
getGroupItemsCount( integer $iUserId, string $sSearch = '', string $sFirstCharacter = '' )
Returns a number of groups which match the specified criteria.
Returns a number of groups which match the specified criteria.
Parameters
- $iUserId
- User ID
- $sSearch
- = '' Search pattern. Default value is empty string.
- $sFirstCharacter
- = '' If specified, will only return contacts with names starting from the specified character. Default value is empty string.
Returns
integer
|
public
array|boolean
|
#
getGroupItems( integer $iUserId, integer $iSortField = EContactSortField::Name, integer $iSortOrder = ESortOrder::ASC, integer $iOffset = 0, integer $iRequestLimit = 20, string $sSearch = '', string $sFirstCharacter = '', integer $iContactId = 0 )
Returns filtered and sorted list of user's groups.
Returns filtered and sorted list of user's groups.
Parameters
- $iUserId
- User ID
- $iSortField
- Default value is EContactSortField::Name.
- $iSortOrder
Sorting order. Accepted values:
ESortOrder::ASC
ESortOrder::DESC,
for ascending and descending respectively. Default value is ESortOrder::ASC. ,
- $iOffset
- Ordinal number of the contact item the list stars with. Default value is 0.
- $iRequestLimit
- The upper limit for total number of contacts returned. Default value is 20.
- $sSearch
- Search pattern. Default value is empty string.
- $sFirstCharacter
- If specified, will only return contacts with names starting from the specified character. Default value is empty string.
- $iContactId
- If set, will only return groups which contain specific contact. Default value is 0.
Returns
array|boolean
|
public
array|boolean
|
#
getSuggestItems( CAccount $oAccount, string $sSearch = '', integer $iRequestLimit = 20, boolean $bGlobalOnly = false, boolean $bPhoneOnly = false, integer $iSharedTenantId = null )
Provides flexible interface for getting autocompletion list of contacts
Provides flexible interface for getting autocompletion list of contacts
Parameters
- $oAccount
- Account object
- $sSearch
- Search pattern, usually a text entered in the input field thus far. Default value is empty string.
- $iRequestLimit
- The upper limit for total number of contacts returned. Default value is 20.
- $bGlobalOnly
- If set to true, will only return entries from Global Address book. Default value is false. Aurora only.
- $bPhoneOnly
- If set to true, will only search against phone numbers. Default value is false.
- $iSharedTenantId
- If specified, will only search within shared contacts for specific tenant. Default value is null. Aurora only.
Returns
array|boolean
|
public
boolean
|
#
createContact( CContact $oContact )
The method is used for saving created contact to the database.
The method is used for saving created contact to the database.
Parameters
Returns
boolean
|
public
boolean
|
#
createGroup( CGroup $oGroup )
The method is used for saving created group to the database.
The method is used for saving created group to the database.
Parameters
Returns
boolean
|
public
boolean
|
#
deleteContacts( integer $iUserId, array $aContactsIds, integer $iTenantId = null )
Deletes one or multiple contacts from user's address book.
Deletes one or multiple contacts from user's address book.
Parameters
- $iUserId
- User ID
- $aContactsIds
- List of contacts IDs
- $iTenantId
- If specified, the search is restricted to specific tenant. Default value is null. Aurora only.
Returns
boolean
|
public
boolean
|
#
deleteSuggestContacts( integer $iUserId, array $aContactsIds )
The method is used for deleting one or multiple contacts to autocompletion list of contacts.
The method is used for deleting one or multiple contacts to autocompletion list of contacts.
Parameters
- $iUserId
- User ID
- $aContactsIds
- List of contacts IDs
Returns
boolean
|
public
boolean
|
#
resetContactFrequency( integer $iUserId, mixed $sContactId )
todo
Parameters
- $iUserId
- User ID
- $sContactId
- $mGroupId Group ID
Returns
boolean
|
public
boolean
|
#
deleteGroups( integer $iUserId, array $aGroupsIds )
Deletes one or multiple contacts from user's address book.
Deletes one or multiple contacts from user's address book.
Parameters
- $iUserId
- User ID
- $aGroupsIds
- List of groups IDs
Returns
boolean
|
public
boolean
|
#
deleteGroup( integer $iUserId, mixed $mGroupId )
Deletes specific group from user's address book.
Deletes specific group from user's address book.
Parameters
- $iUserId
- User ID
- $mGroupId
- Group ID
Returns
boolean
|
public
boolean
|
#
updateSuggestTable( integer $iUserId, array $aEmails )
The method is used for deleting one or multiple contacts to autocompletion list of contacts.
The method is used for deleting one or multiple contacts to autocompletion list of contacts.
Parameters
- $iUserId
- User ID
- $aEmails
- List of email addresses
Returns
boolean
|
public
integer|false
|
#
import( integer $iUserId, string $sSyncType, string $sTempFileName, integer & $iParsedCount, integer $iGroupId, boolean $bIsShared )
Allows for importing data into user's address book.
Allows for importing data into user's address book.
Parameters
- $iUserId
- User ID
- $sSyncType
- Data source type. Currently, "csv" and "vcf" options are supported.
- $sTempFileName
- Path to the file data are imported from.
- $iParsedCount
- $iGroupId
- $bIsShared
Returns
integer|false If importing is successful, number of imported entries is returned.
|
public
string
|
#
export( integer $iUserId, string $sSyncType )
Allows for exporting data from user's address book.
Allows for exporting data from user's address book.
Parameters
- $iUserId
- User ID
- $sSyncType
- Data source type. Currently, "csv" and "vcf" options are supported.
Returns
string | bool
|
public
boolean
|
#
clearAllContactsAndGroups( CAccount $oAccount )
The method will delete all the groups and contacts from user's address book.
The method will delete all the groups and contacts from user's address book.
Parameters
- $oAccount
- Object representing account to be processed
Returns
boolean
|
public
boolean
|
#
flushContacts( )
The method will completely delete all marked as deleted contacts from user's address book.
The method will completely delete all marked as deleted contacts from user's address book.
Returns
boolean
|
public
|
#
updateContactGroupsIdsWithNames( CContact & $oContact )
The method will replace contact groups id's width groups names
The method will replace contact groups id's width groups names
Parameters
|
public
boolean
|
#
addContactsToGroup( CGroup $oGroup, array $aContactIds )
Adds one or multiple contacts to the specific group.
Adds one or multiple contacts to the specific group.
Parameters
- $oGroup
- Group object to be used
- $aContactIds
- List of contact IDs to be added
Returns
boolean
|
public
boolean
|
#
addGlobalContactsToGroup( CAccount $oAccount, CGroup $oGroup, array $aContactIds )
Adds one or multiple contacts from global address book to the specific group. Aurora only.
Adds one or multiple contacts from global address book to the specific group. Aurora only.
Parameters
- $oAccount
- Object representing account to be processed
- $oGroup
- Group object to be used
- $aContactIds
- List of contact IDs to be added
Returns
boolean
|
public
boolean
|
#
removeContactsFromGroup( CGroup $oGroup, array $aContactIds )
The method deletes one or multiple contacts from the group.
The method deletes one or multiple contacts from the group.
Parameters
- $oGroup
- Group object to be used
- $aContactIds
- List of contact IDs to be deleted
Returns
boolean
|
public
boolean
|
#
synchronizeExternalContacts( CAccount $oAccount, boolean $bSelfOnly = false )
The method create contact in global address book for each system account
The method create contact in global address book for each system account
Parameters
Returns
boolean
|
public
boolean
|
#
getGroupEvents( integer $iUserId, integer $iGroupId )
Returns list of calendar events the specific group belongs to
Returns list of calendar events the specific group belongs to
Parameters
Returns
boolean
|
public
boolean
|
#
getGroupEvent( string $sCalendarId, string $sEventId )
Return calendar event the specific group belongs to
Return calendar event the specific group belongs to
Parameters
Returns
boolean
|
public
boolean
|
#
isGroupEventExists( integer $iGroupId, string $sCalendarId, string $sEventId )
Return calendar event existence the specific group belongs to
Return calendar event existence the specific group belongs to
Parameters
- $iGroupId
- $sCalendarId
- $sEventId
Returns
boolean
|
public
boolean
|
#
addEventToGroup( integer $iGroupId, string $sCalendarId, string $sEventId )
Adds calendar event to the specific group.
Adds calendar event to the specific group.
Parameters
- $iGroupId
- $sCalendarId
- $sEventId
Returns
boolean
|
public
boolean
|
#
removeEventFromGroup( integer $iGroupId, string $sCalendarId, string $sEventId )
Remove calendar event from the specific group.
Remove calendar event from the specific group.
Parameters
- $iGroupId
- $sCalendarId
- $sEventId
Returns
boolean
|
public
boolean
|
#
removeEventFromAllGroups( string $sCalendarId, string $sEventId )
Remove calendar event from the all groups.
Remove calendar event from the all groups.
Parameters
Returns
boolean
|