1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
GetCollabIdBySourceTrait.php
См. документацию.
1<?php
2
3namespace Bitrix\Socialnetwork\Collab\Controller\Trait;
4
5use Bitrix\Main\HttpRequest;
6use Bitrix\Socialnetwork\Collab\Integration\IM\Chat;
7
8trait GetCollabIdBySourceTrait
9{
10 public function resolveCollabId(HttpRequest $request, string $collabIdKey = 'collabId'): int
11 {
12 $collabId = (int)$request->get($collabIdKey);
13 if ($collabId > 0)
14 {
15 return $collabId;
16 }
17
18 if ($collabIdKey !== 'collabId')
19 {
20 $collabId = (int)$request->get('collabId');
21 if ($collabId > 0)
22 {
23 return $collabId;
24 }
25 }
26
27 $dialogId = (string)$request->get('dialogId');
28 if (!empty($dialogId))
29 {
30 return Chat::getCollabIdByDialog($dialogId);
31 }
32
33 return 0;
34 }
35}
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения catalog_reindex.php:36