Bitrix API

ChatFactory uses ContextCustomer

Table of Contents

Constants

NON_CACHED_FIELDS  = ['MESSAGE_COUNT', 'USER_COUNT', 'LAST_MESSAGE_ID']

Methods

addChat()  : Result
cleanCache()  : void
createNotifyFeed()  : Chat|NotifyChat
createOpenChat()  : Chat|OpenChat
createOpenLineChat()  : Chat|OpenLineChat
createPersonalChat()  : Chat|FavoriteChat
createPrivateChat()  : Chat|PrivateChat
findChat()  : Result
getChat()  : Chat|null
getChatById()  : Chat|null
getContext()  : Context
Returns the local or global context for the action.
getEntityChat()  : Chat|EntityChat|null
getGeneralChannel()  : ChannelChat|null
getGeneralChat()  : Chat|GeneralChat|null
getInstance()  : self
Returns current instance of the Dispatcher.
getNotifyFeed()  : Chat|NotifyChat|null
getPersonalChat()  : Chat|FavoriteChat|null
getPrivateChat()  : Chat|PrivateChat|null
initChat()  : Chat
setContext()  : self
Sets new context for operations.
setContextUser()  : self
withContext()  : static
Provides local context for the action.
withContextUser()  : static
Provides local context for the action.

Constants

NON_CACHED_FIELDS

public mixed NON_CACHED_FIELDS = ['MESSAGE_COUNT', 'USER_COUNT', 'LAST_MESSAGE_ID']

Methods

addChat()

public addChat(array<string|int, mixed> $params) : Result
Parameters
$params : array<string|int, mixed>
Return values
Result

cleanCache()

public cleanCache(int $id) : void
Parameters
$id : int

createNotifyFeed()

public createNotifyFeed([array<string|int, mixed>|null $params = null ]) : Chat|NotifyChat
Parameters
$params : array<string|int, mixed>|null = null
Return values
Chat|NotifyChat

createOpenChat()

public createOpenChat([array<string|int, mixed>|null $params = null ]) : Chat|OpenChat
Parameters
$params : array<string|int, mixed>|null = null
Return values
Chat|OpenChat

createPrivateChat()

public createPrivateChat([array<string|int, mixed>|null $params = null ]) : Chat|PrivateChat
Parameters
$params : array<string|int, mixed>|null = null
Return values
Chat|PrivateChat

findChat()

public findChat(array<string|int, mixed> $params) : Result
Parameters
$params : array<string|int, mixed>
[
	(string) MESSAGE_TYPE - Message type:
		@see \IM_MESSAGE_SYSTEM = S - notification,
		@see \IM_MESSAGE_PRIVATE = P - private chat,
		@see \IM_MESSAGE_CHAT = C - group chat,
		@see \IM_MESSAGE_OPEN = O - open chat,
		@see \IM_MESSAGE_OPEN_LINE = L - open line chat.

	(string|int) DIALOG_ID - Dialog Id:
		chatNNN - chat,
		sgNNN - sonet group,
		crmNNN - crm chat,
		NNN - recipient user.

	(int) CHAT_ID - Chat Id.
	(int) TO_USER_ID - Recipient user Id.
	(int) FROM_USER_ID - Sender user Id.
]
Return values
Result

getChat()

public getChat(array<string|int, mixed>|int|string $params) : Chat|null
Parameters
$params : array<string|int, mixed>|int|string
Return values
Chat|null

getChatById()

public getChatById(int $chatId) : Chat|null
Parameters
$chatId : int
Return values
Chat|null

getEntityChat()

public getEntityChat(string $entityType, int|string $entityId) : Chat|EntityChat|null
Parameters
$entityType : string
$entityId : int|string
Return values
Chat|EntityChat|null

getInstance()

Returns current instance of the Dispatcher.

public static getInstance() : self
Return values
self

initChat()

public initChat([array<string|int, mixed>|null $params = null ]) : Chat
Parameters
$params : array<string|int, mixed>|null = null
Return values
Chat

setContext()

Sets new context for operations.

public setContext(Context|null $context) : self
Parameters
$context : Context|null
Return values
self

setContextUser()

public setContextUser(mixed $user) : self
Parameters
$user : mixed
Return values
self

withContext()

Provides local context for the action.

public withContext(Context|null $context) : static
Parameters
$context : Context|null
Return values
static

withContextUser()

Provides local context for the action.

public withContextUser(int|User|User $user) : static
Parameters
$user : int|User|User
Return values
static

        
On this page

Search results