AllDay = TPropertyValue::ensureBoolean($event->AllDay); $this->DateFrom = $this->getBeginDate($event)->format('Y-m-d'); $this->DateTo = $this->getEndDate($event)->format('Y-m-d'); } public static function __compare(EventDTO $ev1, EventDTO $ev2) { if ($ev1->GridPosition === NULL || $ev2->GridPosition === NULL) { return parent::__compare($ev1, $ev2); } return $ev1->GridPosition - $ev2->GridPosition; } } ?>