Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
provider.php
1<?php
2
4
7
15{
16 private const TYPE = 'events';
17
19 private $event;
20
21 public function __construct(Event $event)
22 {
23 $this->event = $event;
24 }
25
29 public static function getCode(): string
30 {
31 return self::TYPE;
32 }
33
34 protected function needProvideData(): bool
35 {
36 return true;
37 }
38
42 protected function getProviderData(): array
43 {
44 return [
45 'event_code' => $this->event->getName(),
46 'events' => [
47 [
48 'created_at' => (new Main\Type\DateTime())->getTimestamp(),
49 'payload' => $this->event->getPayload(),
50 ],
51 ],
52 ];
53 }
54}