Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
buidlersynceventfromexternalevent.php
1
<?php
2
3
namespace
Bitrix\Calendar\Sync\Google\Builders
;
4
5
use
Bitrix\Calendar\Core\Builders\Builder
;
6
use
Bitrix\Calendar\Core\Event\Event
;
7
use
Bitrix\Calendar\Sync\Connection\Connection
;
8
use
Bitrix\Calendar\Sync\Connection\EventConnection
;
9
use
Bitrix\Calendar\Sync\Entities\SyncEvent
;
10
11
class
BuidlerSyncEventFromExternalEvent
implements
Builder
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
}
Bitrix\Calendar\Core\Event\Event
Definition
event.php:20
Bitrix\Calendar\Core\Mappers\Connection
Definition
connection.php:23
Bitrix\Calendar\Core\Mappers\SyncEvent
Definition
syncevent.php:12
Bitrix\Calendar\Sync\Connection\Connection
Definition
connection.php:13
Bitrix\Calendar\Sync\Connection\EventConnection
Definition
eventconnection.php:9
Bitrix\Calendar\Sync\Entities\SyncEvent
Definition
syncevent.php:8
Bitrix\Calendar\Sync\Google\Builders\BuidlerSyncEventFromExternalEvent
Definition
buidlersynceventfromexternalevent.php:12
Bitrix\Calendar\Sync\Google\Builders\BuidlerSyncEventFromExternalEvent\__construct
__construct(array $externalEvent, Event $event, Connection $connection)
Definition
buidlersynceventfromexternalevent.php:17
Bitrix\Calendar\Sync\Google\Builders\BuidlerSyncEventFromExternalEvent\build
build()
Definition
buidlersynceventfromexternalevent.php:27
Bitrix\Calendar\Sync\Google\Builders\BuilderEventConnectionFromExternalEvent
Definition
buildereventconnectionfromexternalevent.php:12
Bitrix\Calendar\Sync\Google\Builders\BuilderEventWithLocalEvent
Definition
buildereventwithlocalevent.php:10
Bitrix\Calendar\Core\Builders\Builder
Definition
builder.php:6
Bitrix\Calendar\Sync\Google\Builders
Definition
buidlersynceventfromexternalevent.php:3
modules
calendar
lib
sync
google
builders
buidlersynceventfromexternalevent.php
Создано системой
1.10.0