public static function newFromKalenderEvent(KalenderEvent $KE) { $T = new Todo(-1); $T->loadMeOrEmpty(); $T->changeA("TodoFromDay", Kalender::parseDay($KE->getDay())); $T->changeA("TodoFromTime", Kalender::parseTime($KE->getTime())); $T->changeA("TodoTillDay", Kalender::parseDay($KE->getEndDay())); $T->changeA("TodoTillTime", Kalender::parseTime($KE->getEndTime())); $T->changeA("TodoType", "2"); $T->changeA("TodoName", $KE->title()); $T->changeA("TodoClass", $KE->ownerClass()); $T->changeA("TodoClassID", $KE->ownerClassID()); $T->changeA("TodoUserID", Session::currentUser()->getID()); $T->changeA("TodoOrganizer", $KE->organizer()); return $T->newMe(); }