14 private static ?
self $instance;
18 self::$instance ??=
new self();
20 return self::$instance;
25 $eventCommonParams = [
26 'module_id' => PushService::MODULE_ID,
27 'command' => PushCommandEnum::EVENT_CATEGORY_CREATED->name,
29 'id' => $eventCategory->
getId(),
31 eventCategory: $eventCategory,
37 $this->sendEvent($eventCategory, $eventCommonParams);
42 $eventCommonParams = [
43 'module_id' => PushService::MODULE_ID,
44 'command' => PushCommandEnum::EVENT_CATEGORY_UPDATED->name,
46 'id' => $eventCategory->
getId(),
48 eventCategory: $eventCategory,
53 $this->sendEvent($eventCategory, $eventCommonParams,
$userId);
58 $eventCommonParams = [
59 'module_id' => PushService::MODULE_ID,
63 'id' => $eventCategory->
getId(),
68 $this->sendEvent($eventCategory, $eventCommonParams);
71 private function generateTagByCategoryId(
int $eventCategoryId): string
73 return sprintf(
'%s_%d', PushTagEnum::EVENT_CATEGORY->name, $eventCategoryId);
78 if (!Loader::includeModule(
'pull'))
83 $tag = $eventCategoryId
84 ? $this->generateTagByCategoryId($eventCategoryId)
85 : PushTagEnum::EVENT_CATEGORY->name;
87 \CPullWatch::Add(
$userId, $tag);
92 if (!Loader::includeModule(
'pull'))
104 ? $this->generateTagByCategoryId($eventCategory->
getId())
105 : PushTagEnum::EVENT_CATEGORY->name;
106 PushService::addEventByTag($tag,
$params);
110 private function __construct()
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
static prepareEventCategoryForUserResponse(EventCategory $eventCategory, int $userId=0, ?bool $isMuted=null,)
updateEvent(EventCategory $eventCategory, array $fields=[], ?int $userId=null)
addToWatch(int $userId, ?int $eventCategoryId=null)
deleteEvent(EventCategory $eventCategory)
createEvent(EventCategory $eventCategory)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']