197 if (isset($this->fields[
'ATTENDEES_CODES']))
199 if (is_string($this->fields[
'ATTENDEES_CODES']))
201 $collection->setAttendeesCodes(explode(
',', $this->fields[
'ATTENDEES_CODES']));
203 else if (is_array($this->fields[
'ATTENDEES_CODES']))
205 $collection->setAttendeesCodes($this->fields[
'ATTENDEES_CODES']);
209 if (isset($this->fields[
'ATTENDEES']) && is_array($this->fields[
'ATTENDEES']))
211 $collection->setAttendeesId($this->fields[
'ATTENDEES']);
215 $collection->setAttendeesId([(
int)$this->fields[
'OWNER_ID']]);
228 if (isset($this->fields[
'REMIND']) && is_string($this->fields[
'REMIND']))
230 $this->fields[
'REMIND'] = unserialize($this->fields[
'REMIND'], [
'allowed_classes' =>
false]);
233 if (!isset($this->fields[
'REMIND']) || !is_array($this->fields[
'REMIND']))
241 $collection->setEventStart($eventStart);
243 foreach ($this->fields[
'REMIND'] as $remind)
245 if ($remind[
'type'] ===
Event\Tools\Dictionary::REMIND_UNIT[
'date'])
247 $collection->add((
new Event\Properties\Remind())
253 $this->fields[
'TZ_FROM']
257 ->setEventStart($eventStart)
260 elseif ($remind[
'type'] ===
Event\Properties\Remind::UNIT_DAY_BEFORE)
262 $collection->add((
new Event\Properties\Remind())
263 ->setEventStart($eventStart)
267 $eventStart->toString(),
269 $this->fields[
'TZ_FROM'])
272 ->sub(
"{$remind['before']} days")
273 ->add(
"{$remind['time']} minutes")
275 ->setDaysBefore($remind[
'before'])
280 $collection->add((
new Event\Properties\Remind())
281 ->setTimeBeforeEvent(
283 Event\Tools\Dictionary::REMIND_UNIT[$remind[
'type']]
284 ??
Event\Properties\Remind::UNIT_MINUTES
286 ->setEventStart($eventStart)