public function add_batch() { if (!$this->token->validate('add_batch')) { $this->error->add($this->token->getErrorMessage()); } if (!$this->error->has()) { $batch = new Batch(); $batch->setNotes($this->request->request->get('notes')); $this->entityManager->persist($batch); $this->entityManager->flush(); $this->flash('success', t('Batch added successfully.')); $this->redirect('/dashboard/system/migration/import', 'view_batch', $batch->getId()); } $this->view(); }