1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
comment.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Core\Managers;
4
5use Bitrix\Calendar\Integration\SocialNetwork\SpaceService;
6
7final class Comment
8{
9 private SpaceService $spaceService;
10
11 public function __construct()
12 {
13 $this->spaceService = new SpaceService();
14 }
15
16 public function onEventCommentAdd(array $data): void
17 {
18 $this->spaceService->addEvent(
19 'onCalendarEventCommentAdd',
20 $data,
21 );
22 }
23
24 public static function onCommentDeleteHandler($event): void
25 {
26 if ($event instanceof \Bitrix\Main\Event)
27 {
28 (new self())->onCommentDelete($event);
29 }
30 }
31
32 public function onCommentDelete(\Bitrix\Main\Event $calendarEvent): void
33 {
34 // TODO do not use before event getting rework (perms check)
35 return;
36 [$type, $eventId, $messageData] = $calendarEvent->getParameters();
37
38 if ($type !== 'EV' || !is_numeric($eventId) || empty($messageData['MESSAGE_ID']))
39 {
40 return;
41 }
42
43 $calendarEvent = \CCalendarEvent::GetById($eventId);
44 if (is_array($calendarEvent))
45 {
46 $this->spaceService->addEvent(
47 'onCalendarEventCommentDelete',
48 [
49 'ID' => (int)$eventId,
50 'COMMENT_ID' => (int)$messageData['MESSAGE_ID'],
51 'ATTENDEE_LIST' => $calendarEvent['ATTENDEE_LIST'] ?? null,
52 'ATTENDEES_CODES' => $calendarEvent['ATTENDEES_CODES'] ?? null,
53 ],
54 );
55 }
56 }
57}
$type
Определения options.php:106
static onCommentDeleteHandler($event)
Определения comment.php:24
onEventCommentAdd(array $data)
Определения comment.php:16
onCommentDelete(\Bitrix\Main\Event $calendarEvent)
Определения comment.php:32
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$event
Определения prolog_after.php:141