1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
StartWriting.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2\Pull\Event;
4
5
use Bitrix\Im\V2\Common\ContextCustomer;
6
use Bitrix\Im\V2\Pull\EventType;
7
12
class
StartWriting
extends
BaseChatEvent
13
{
14
use ContextCustomer;
15
use DialogIdFiller;
16
17
protected
?
string
$customUserName
=
null
;
18
protected
int
$expiry
= 60;
19
20
public
function
setCustomUserName
(?
string
$customUserName
): self
21
{
22
if
(
$customUserName
)
23
{
24
$this->customUserName =
$customUserName
;
25
}
26
27
return
$this;
28
}
29
30
protected
function
getType
():
EventType
31
{
32
return
EventType::StartWriting;
33
}
34
35
protected
function
getBasePullParamsInternal
():
array
36
{
37
return
[
38
'dialogId'
=> $this->
getBaseDialogId
(),
39
'userId'
=> $this->getContext()->getUserId(),
40
'userName'
=> $this->customUserName ?? $this->getContext()->getUser()->getName(),
41
'userFirstName'
=> $this->customUserName ?? $this->getContext()->getUser()->getFirstName(),
42
];
43
}
44
45
protected
function
getSkippedUserIds
():
array
46
{
47
return
[$this->getContext()->getUserId()];
48
}
49
}
Bitrix\Im\V2\Pull\Event\BaseChatEvent
Определения
BaseChatEvent.php:9
Bitrix\Im\V2\Pull\Event\BaseChatEvent\getBaseDialogId
getBaseDialogId()
Определения
BaseChatEvent.php:28
Bitrix\Im\V2\Pull\Event\StartWriting
Определения
StartWriting.php:13
Bitrix\Im\V2\Pull\Event\StartWriting\getBasePullParamsInternal
getBasePullParamsInternal()
Определения
StartWriting.php:35
Bitrix\Im\V2\Pull\Event\StartWriting\$customUserName
string $customUserName
Определения
StartWriting.php:17
Bitrix\Im\V2\Pull\Event\StartWriting\getSkippedUserIds
getSkippedUserIds()
Определения
StartWriting.php:45
Bitrix\Im\V2\Pull\Event\StartWriting\$expiry
int $expiry
Определения
StartWriting.php:18
Bitrix\Im\V2\Pull\Event\StartWriting\getType
getType()
Определения
StartWriting.php:30
Bitrix\Im\V2\Pull\Event\StartWriting\setCustomUserName
setCustomUserName(?string $customUserName)
Определения
StartWriting.php:20
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Im\V2\Pull\EventType
EventType
Определения
EventType.php:6
bitrix
modules
im
lib
V2
Pull
Event
StartWriting.php
Создано системой
1.14.0