1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
MailType.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Chat\EntityLink;
4
5use Bitrix\Im\V2\Chat\EntityLink;
6use Bitrix\Main\Loader;
7
8class MailType extends EntityLink
9{
10 protected const HAS_URL = true;
11
12 protected function getUrl(): string
13 {
14 if (!Loader::includeModule('mail'))
15 {
16 return '';
17 }
18
19 return \Bitrix\Mail\Integration\Intranet\Secretary::getMessageUrlForChat((int)$this->entityId, $this->chatId) ?? '';
20 }
21
22 protected function fillUrl(): void
23 {
24 if ($this->getContext()->getUser()->isExtranet())
25 {
26 return;
27 }
28
29 $this->fillUrlWithCache();
30 }
31}