176 $remindField = $this->
event->getRemind();
177 if (is_string($remindField))
179 $remindField = unserialize($remindField, [
'allowed_classes' =>
false]);
182 if (!is_array($remindField))
190 $collection->setEventStart($eventStart);
191 foreach ($remindField as $remind)
193 if ($remind[
'type'] ===
Event\Tools\Dictionary::REMIND_UNIT[
'date'])
195 $collection->add((
new Event\Properties\Remind())
203 ->setEventStart($eventStart)
206 elseif ($remind[
'type'] ===
Event\Properties\Remind::UNIT_DAY_BEFORE)
208 $collection->add((
new Event\Properties\Remind())
209 ->setEventStart($eventStart)
212 $eventStart->toString(),
214 $this->getStartTimezone())
217 ->sub(
"{$remind['before']} days")
218 ->add(
"{$remind['time']} minutes")
220 ->setDaysBefore($remind[
'before'])
225 $collection->add((
new Event\Properties\Remind())
226 ->setTimeBeforeEvent(
228 Event\Tools\Dictionary::REMIND_UNIT[$remind[
'type']]
230 ->setEventStart($eventStart)