Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
buidlersynceventfromexternalevent.php
1<?php
2
4
10
12{
13 private array $externalEvent;
14 private Event $event;
15 private Connection $connection;
16
17 public function __construct(array $externalEvent, Event $event, Connection $connection)
18 {
19 $this->externalEvent = $externalEvent;
20 $this->event = $event;
21 $this->connection = $connection;
22 }
23
27 public function build(): SyncEvent
28 {
29 $syncEvent = new SyncEvent();
30 $event = (new BuilderEventWithLocalEvent($this->externalEvent, $this->event))->build();
31 $eventConnection = (new BuilderEventConnectionFromExternalEvent(
32 $this->externalEvent,
33 $this->event,
34 $this->connection
35 ))->build();
36
37 $syncEvent->setEvent($event);
38 $syncEvent->setEventConnection($eventConnection);
39
40 return $syncEvent;
41 }
42}
__construct(array $externalEvent, Event $event, Connection $connection)