public function addLogEntry($text, $type = 3) { if (!ExportLogEntry::isValidType($type)) { return false; } $entry = new ExportLogEntry(); $entry->setTime(time()); $entry->setType($type); $entry->setExportJob($this); $entry->setText($text); $entry->save(); return true; }