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