Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
eventdto.php
1<?php
2
4
5class EventDto extends Dto
6{
7 // "@odata.etag": "W/\"IiLKjG2I7E+Xv0+ys6MD0wAEHja7TQ==\"",
9 public $etag;
11 public $id;
13 public $changeKey;
25 public $iCalUId;
33 public $subject;
41 public $isAllDay;
51 public $showAs;
53 public $type;
55 public $webLink;
67 public $isDraft;
73 public $body;
75 public $start;
77 public $end;
83 public $location;
85 public $locations;
89 public $attendees;
91 public $organizer;
94
98 public function __construct(array $data)
99 {
100 $this->etag = $data['@odata.etag'] ?? '';
101 unset($data['@odata.etag']);
102 parent::__construct($data);
103 }
104
108 protected function getComplexPropertyMap(): array
109 {
110 return [
111 'responseStatus' => [
112 'class' => ResponseStatusDto::class,
113 'isMandatory' => false,
114 ],
115 'body' => [
116 'class' => RichTextDto::class,
117 'isMandatory' => true,
118 ],
119 'start' => [
120 'class' => DateTimeDto::class,
121 'isMandatory' => true,
122 ],
123 'end' => [
124 'class' => DateTimeDto::class,
125 'isMandatory' => true,
126 ],
127 'location' => [
128 'class' => LocationDto::class,
129 'isMandatory' => true,
130 ],
131 'organizer' => [
132 'class' => PersonDto::class,
133 'isMandatory' => true,
134 ],
135 'recurrence' => [
136 'class' => RecurrenceDto::class,
137 'isMandatory' => false,
138 ],
139 'locations' => [
140 'class' => LocationDto::class,
141 'isMandatory' => false,
142 'isArray' => true
143 ],
144 'attendees' => [
145 'class' => ParticipantDto::class,
146 'isMandatory' => true,
147 'isArray' => true,
148 ],
149 ];
150 }
151}