Bitrix API

Utils extends Utils

Table of Contents

Constants

CACHE_DIR_TEMPLATES  = '/messageservice/templates/'
CACHE_KEY_TEMPLATES  = 'whatsapp_templates_cache'

Methods

__construct()  : mixed
checkActiveChannelBySubjectIdList()  : bool
cleanTemplatesCache()  : void
clearCache()  : void
getActiveChannelList()  : Result
getCascadeIdFromSubject()  : Result
getCascadeList()  : Result
getChannelList()  : Result
getMessageTemplates()  : Result
getSentTemplateMessage()  : string
prepareTemplateMessageText()  : string
sendTemplate()  : Result
setCallback()  : Result
testConnection()  : Result
updateSavedChannelList()  : array<string|int, mixed>
Loads channels from provider.

Constants

CACHE_DIR_TEMPLATES

public mixed CACHE_DIR_TEMPLATES = '/messageservice/templates/'

CACHE_KEY_TEMPLATES

public mixed CACHE_KEY_TEMPLATES = 'whatsapp_templates_cache'

Methods

checkActiveChannelBySubjectIdList()

public checkActiveChannelBySubjectIdList(array<string|int, mixed> $subjectIdList, string $imType) : bool
Parameters
$subjectIdList : array<string|int, mixed>
$imType : string
Return values
bool

cleanTemplatesCache()

public static cleanTemplatesCache() : void

clearCache()

public clearCache(string $key) : void
Parameters
$key : string

getActiveChannelList()

public getActiveChannelList(string $imType) : Result
Parameters
$imType : string
Return values
Result

getCascadeIdFromSubject()

public getCascadeIdFromSubject(int|string $subject, callable $subjectComparator) : Result
Parameters
$subject : int|string
$subjectComparator : callable
Return values
Result

getMessageTemplates()

public getMessageTemplates([string $subject = '' ]) : Result
Parameters
$subject : string = ''
Return values
Result

getSentTemplateMessage()

public getSentTemplateMessage(string $from, string $to) : string
Parameters
$from : string
$to : string
Return values
string

prepareTemplateMessageText()

public prepareTemplateMessageText(array<string|int, mixed> $message) : string
Parameters
$message : array<string|int, mixed>
Return values
string

sendTemplate()

public sendTemplate(string $name, string $text[, array<string|int, mixed> $examples = [] ][, string|null $langCode = null ]) : Result
Parameters
$name : string
$text : string
$examples : array<string|int, mixed> = []
$langCode : string|null = null
Return values
Result

setCallback()

public setCallback(string $callbackUrl, array<string|int, mixed> $callbackTypes[, int|null $subjectId = null ]) : Result
Parameters
$callbackUrl : string
$callbackTypes : array<string|int, mixed>
$subjectId : int|null = null
Tags
see
https://docs.edna.ru/kb/callback-set/
Return values
Result

testConnection()

public testConnection() : Result
Return values
Result

updateSavedChannelList()

Loads channels from provider.

public updateSavedChannelList(string $channelType) : array<string|int, mixed>
Parameters
$channelType : string
Return values
array<string|int, mixed>

        
On this page

Search results