Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
buildereventwithlocalevent.php
1<?php
2
4
8
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}
setDescription(?string $description)
Definition event.php:320