Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/socialnetwork/lib/integration/pull/ |
Upload File : |
<?php namespace Bitrix\Socialnetwork\Integration\Pull; use Bitrix\Socialnetwork\Item\Log; use Bitrix\Socialnetwork\Livefeed\Provider; class Tag { public function getWatchingTagsByLogId(int $logId): array { $log = Log::getById($logId); if (!$log) { return []; } $liveFeedContent = Provider::getContentId($log->getFields()); $entityType = $liveFeedContent['ENTITY_TYPE'] ?? null; $entityId = $liveFeedContent['ENTITY_ID'] ?? null; if (!$entityType || !$entityId) { return []; } return [ 'CONTENTVIEW' . $entityType . '-' . $entityId, 'UNICOMMENTS' . $this->getForumEntityType($entityType) . '_' . $entityId, 'UNICOMMENTSMOBILE' . $this->getForumEntityType($entityType) . '_' . $entityId, ]; } public function getTasksProjects(int $groupId): array { return [ "TASKS_PROJECTS_$groupId" ]; } private function getForumEntityType(string $entityType): string { return match ($entityType) { 'TASK' => 'TASK', 'CALENDAR_EVENT' => 'EVENT', default => 'BLOG', }; } }