protected function copyBatchJobToLog(BatchJob $batchJob, BatchJobLog $batchJobLog) { $batchJob->copyIntoBatchLog($batchJobLog, true); $batchJobLog->setJobId($batchJob->getId()); return $batchJobLog; }