1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
tag.php
См. документацию.
1<?php
2
3namespace Bitrix\Socialnetwork\Integration\Pull;
4
5use Bitrix\Socialnetwork\Item\Log;
6use Bitrix\Socialnetwork\Livefeed\Provider;
7
8class Tag
9{
10 public function getWatchingTagsByLogId(int $logId): array
11 {
12 $log = Log::getById($logId);
13 if (!$log)
14 {
15 return [];
16 }
17
18 $liveFeedContent = Provider::getContentId($log->getFields());
19 $entityType = $liveFeedContent['ENTITY_TYPE'] ?? null;
20 $entityId = $liveFeedContent['ENTITY_ID'] ?? null;
21 if (!$entityType || !$entityId)
22 {
23 return [];
24 }
25
26 return [
27 'CONTENTVIEW' . $entityType . '-' . $entityId,
28 'UNICOMMENTS' . $this->getForumEntityType($entityType) . '_' . $entityId,
29 'UNICOMMENTSMOBILE' . $this->getForumEntityType($entityType) . '_' . $entityId,
30 ];
31 }
32
33 public function getTasksProjects(int $groupId): array
34 {
35 return [
36 "TASKS_PROJECTS_$groupId"
37 ];
38 }
39
40 private function getForumEntityType(string $entityType): string
41 {
42 return match ($entityType)
43 {
44 'TASK' => 'TASK',
45 'CALENDAR_EVENT' => 'EVENT',
46 default => 'BLOG',
47 };
48 }
49}
getWatchingTagsByLogId(int $logId)
Определения tag.php:10
getTasksProjects(int $groupId)
Определения tag.php:33
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$entityId
Определения payment.php:4