1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Service.php
См. документацию.
1<?php
2
4
12
13final class Service
14{
15 public const SUPPORTED_EVENTS = [
16 EventDictionary::EVENT_SPACE_USER_ROLE_CHANGE,
17 ];
18
19 public function processEvent(Event $event, Recepient $recipient): void
20 {
21 if (!ModuleManager::isModuleInstalled('pull') || !Loader::includeModule('pull'))
22 {
23 return;
24 }
25
26 if (in_array($event->getType(), self::SUPPORTED_EVENTS) && $recipient->isOnline())
27 {
28 $recipients = [$recipient->getId()];
29
30 $userId = $event->getUserId();
31 $spaceId = $event->getGroupId();
32
33 PushService::addEvent($recipients, [
34 'module_id' => PushService::MODULE_NAME,
35 'command' => PushEventDictionary::getPushEventType($event->getType()),
36 'params' => [
37 'USER_ID' => $userId,
38 'GROUP_ID' => $spaceId,
39 ],
40 ]);
41 }
42 }
43}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
Определения loader.php:13
processEvent(Event $event, Recepient $recipient)
Определения Service.php:19
$event
Определения prolog_after.php:141