/** * {@inheritdoc} */ public function handleBatchAction($data) { $action = $data['action']; $vials = new ArrayCollection($data['items']); $response = $this->getDefaultBatchResponse(); switch ($action) { case 'marksterile': $this->markSterile($vials); $response = $this->getBackBatchResponse(); break; case 'marksuccessful': $this->markSuccessful($vials); $response = $this->getBackBatchResponse(); break; case 'markfailed': $this->markFailed($vials); $response = $this->getBackBatchResponse(); break; default: return parent::handleBatchAction($data); } return $response; }