1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
UpdateCollabChatTrait.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Collab\Control\Option\Trait
;
4
5
use
Bitrix\Main\Error
;
6
use
Bitrix\Main\Result
;
7
use
Bitrix\Socialnetwork\Collab\Collab
;
8
use
Bitrix\Socialnetwork\Collab\Integration\IM
;
9
10
trait UpdateCollabChatTrait
11
{
12
protected
function
updateChat(
Collab
$collab,
array
$fields
):
Result
13
{
14
$result
=
new
Result
();
15
16
if
(empty(
$fields
))
17
{
18
return
$result
;
19
}
20
21
$updateService = IM\Messenger::getUpdateService($collab->getChatId(),
$fields
);
22
23
if
($updateService ===
null
)
24
{
25
$result
->addError(
new
Error
(
'Update service not found'
));
26
27
return
$result
;
28
}
29
30
$updateResult = $updateService->updateChat();
31
if
(!$updateResult->isSuccess())
32
{
33
$result
->addErrors($updateResult->getErrors());
34
}
35
36
return
$result
;
37
}
38
}
Bitrix\Main\DB\Result
Определения
result.php:20
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Main\ORM\Data\Result
Определения
result.php:16
Bitrix\Socialnetwork\Collab\Collab
Определения
Collab.php:16
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
Bitrix\Im\V2\Chat\Collab
Определения
CollabInfo.php:3
Bitrix\Socialnetwork\Collab\Control\Option\Trait
Определения
UpdateCollabChatTrait.php:3
Bitrix\Socialnetwork\Collab\Integration\IM
Определения
ActionMessageBuffer.php:5
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
socialnetwork
lib
Collab
Control
Option
Trait
UpdateCollabChatTrait.php
Создано системой
1.14.0