Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
buildereventwithlocalevent.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\Core\Event\Properties\Location
;
8
9
class
BuilderEventWithLocalEvent
implements
Builder
10
{
11
private
array $externalEvent;
12
private
Event
$event;
13
14
public
function
__construct
(array $externalEvent,
Event
$event)
15
{
16
$this->externalEvent = $externalEvent;
17
$this->
event
= $event;
18
}
19
23
public
function
build
():
Event
24
{
25
$this->
event
26
->
setDescription
($this->externalEvent[
'description'
])
27
->setLocation($this->getLocation())
28
;
29
30
return
$this->event;
31
}
32
36
private
function
getLocation(): ?
Location
37
{
38
if
($this->externalEvent[
'location'
])
39
{
40
return
new
Location
($this->externalEvent[
'location'
]);
41
}
42
43
return
null
;
44
}
45
}
Bitrix\Calendar\Core\Event\Event
Definition
event.php:20
Bitrix\Calendar\Core\Event\Event\setDescription
setDescription(?string $description)
Definition
event.php:320
Bitrix\Calendar\Core\Event\Properties\Location
Definition
location.php:9
Bitrix\Calendar\Sync\Google\Builders\BuilderEventWithLocalEvent
Definition
buildereventwithlocalevent.php:10
Bitrix\Calendar\Sync\Google\Builders\BuilderEventWithLocalEvent\build
build()
Definition
buildereventwithlocalevent.php:23
Bitrix\Calendar\Sync\Google\Builders\BuilderEventWithLocalEvent\__construct
__construct(array $externalEvent, Event $event)
Definition
buildereventwithlocalevent.php:14
Bitrix\Calendar\Core\Builders\Builder
Definition
builder.php:6
Bitrix\Calendar\Sync\Google\Builders
Definition
buidlersynceventfromexternalevent.php:3
modules
calendar
lib
sync
google
builders
buildereventwithlocalevent.php
Создано системой
1.10.0