protected function startConsole(Job $job) { /** @var EntityManager $em */ $em = $this->getDoctrine()->getManager(); $job->setUser($this->getUser()->getUsername()); $job->setDone(false); $job->setProgress(0); $job->setStatus("Job intialized"); $em->persist($job); $em->flush(); return $this->redirectToRoute('job.status', ['job' => $job->getId()]); }
/** * {@inheritDoc} */ public function setStatus($status) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setStatus', array($status)); return parent::setStatus($status); }