1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
openeventseen.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Internals\Counter\Processor\Handler;
4
5use Bitrix\Calendar\Internals\Counter\CounterService;
6use Bitrix\Calendar\Internals\Counter\CounterTable;
7use Bitrix\Calendar\Internals\Counter\Event\EventDictionary;
8
10{
11 public function __invoke(array $categories, int $userId): void
12 {
13 $eventIds = [];
14 $categoryIds = [];
15
16 if (!$userId)
17 {
18 return;
19 }
20
21 if (empty($categories))
22 {
23 return;
24 }
25
26 foreach ($categories as $categoryId => $events)
27 {
28 $categoryIds[] = $categoryId;
29 $eventIds = array_merge($eventIds, $events);
30 }
31
32 if (empty($eventIds))
33 {
34 return;
35 }
36
37 CounterTable::deleteByFilter([
38 'EVENT_ID' => $eventIds,
39 'USER_ID' => $userId,
40 ]);
41 // this will run the Counter\Processor\Total which will update users' counters
42 CounterService::addEvent(EventDictionary::OPEN_EVENT_SCORER_UPDATED, [
43 'user_ids' => [$userId],
44 ]);
45
46 (new OpenEventPushScorer())([$userId], $categoryIds);
47 }
48}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static addEvent(string $type, array $data)
Определения counterservice.php:40
__invoke(array $categories, int $userId)
Определения openeventseen.php:11
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804